Instructions to use zai-org/CogVideoX-2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use zai-org/CogVideoX-2b with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("zai-org/CogVideoX-2b", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse filesFiles changed (2)
12345618 unmodified lines252627282930313 unmodified lines3536373839{"_class_name": "AutoencoderKLCogVideoX","_diffusers_version": "0.30.0.dev0","act_fn": "silu","block_out_channels": [128,18 unmodified lines"out_channels": 3,"sample_height": 480,"sample_width": 720,"scaling_factor": 1.15258426,"shift_factor": null,"temporal_compression_ratio": 4,"up_block_types": [3 unmodified lines"CogVideoXUpBlock3D"],"use_post_quant_conv": false,"use_quant_conv": false}12345618 unmodified lines252627282930313 unmodified lines353637383940{"_class_name": "AutoencoderKLCogVideoX","_diffusers_version": "0.32.0.dev0","act_fn": "silu","block_out_channels": [128,18 unmodified lines"out_channels": 3,"sample_height": 480,"sample_width": 720,"scaling_factor": 0.7,"shift_factor": null,"temporal_compression_ratio": 4,"up_block_types": [3 unmodified lines"CogVideoXUpBlock3D"],"use_post_quant_conv": false,"use_quant_conv": false,"invert_scale_latents": true}
123version https://git-lfs.github.com/spec/v1oid sha256:e25e94a8fc70774349bb4a03b8ef272f5d80f934863f7b0552c37c6a74f91542size 431220702123version https://git-lfs.github.com/spec/v1oid sha256:a410e48d988c8224cef392b68db0654485cfd41f345f4a3a81d3e6b765bb995esize 862388596
vae/config.json+4-3
vae/diffusion_pytorch_model.safetensors+2-2