Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

ByteDance
/
Video-As-Prompt-CogVideoX-5B

Image-to-Video
Diffusers
Safetensors
English
CogVideoXImageToVideoPipeline
Model card Files Files and versions
xet
Community

Instructions to use ByteDance/Video-As-Prompt-CogVideoX-5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Diffusers

    How to use ByteDance/Video-As-Prompt-CogVideoX-5B with Diffusers:

    pip install -U diffusers transformers accelerate
    import torch
    from diffusers import DiffusionPipeline
    from diffusers.utils import load_image, export_to_video
    
    # switch to "mps" for apple devices
    pipe = DiffusionPipeline.from_pretrained("ByteDance/Video-As-Prompt-CogVideoX-5B", dtype=torch.bfloat16, device_map="cuda")
    pipe.to("cuda")
    
    prompt = "A man with short gray hair plays a red electric guitar."
    image = load_image(
        "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png"
    )
    
    output = pipe(image=image, prompt=prompt).frames[0]
    export_to_video(output, "output.mp4")
  • Notebooks
  • Google Colab
  • Kaggle
Video-As-Prompt-CogVideoX-5B
32.6 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 5 commits
BianYx's picture
BianYx
Update README.md
437f6f9 verified 6 months ago
  • scheduler
    Add files using upload-large-folder tool 7 months ago
  • text_encoder
    Add files using upload-large-folder tool 7 months ago
  • tokenizer
    Add files using upload-large-folder tool 7 months ago
  • transformer
    Add files using upload-large-folder tool 7 months ago
  • vae
    Add files using upload-large-folder tool 7 months ago
  • .gitattributes
    1.52 kB
    initial commit 7 months ago
  • LICENSE
    5.7 kB
    Add files using upload-large-folder tool 7 months ago
  • README.md
    12.9 kB
    Update README.md 6 months ago
  • configuration.json
    47 Bytes
    Add files using upload-large-folder tool 7 months ago
  • model_index.json
    423 Bytes
    Add files using upload-large-folder tool 7 months ago