Zhipu CogVideoX-5B: 3D Variational Autoencoder, Diffusers Pipeline & LoRA Fine-Tuning
Run Zhipu CogVideoX-5B text-to-video locally with Diffusers, 3D VAE tiling, CPU VRAM offloading on 24GB GPUs, and fast Hugging Face mirror downloads.
πΉ CogVideoX core space-time compression mechanism
CogVideoX-5B uses a customized 3D variational autoencoder (3D VAE) to simultaneously compress video data in both time and space dimensions, with a compression rate as high as 2x8x8. At the same time, it uses the expert Transformer backbone network to understand extremely complex physical motion trajectory prompts.
β‘ Mirror downloading and very low memory inference
export HF_ENDPOINT="https://hf-mirror.net"
huggingface-cli download THUDM/CogVideoX-5b \
--local-dir /data/models/CogVideoX-5b \
--local-dir-use-symlinks False
import torch
from diffusers import CogVideoXPipeline
from diffusers.utils import export_to_video
#
pipe = CogVideoXPipeline.from_pretrained("/data/models/CogVideoX-5b", torch_dtype=torch.bfloat16)
pipe.enable_model_cpu_offload()
pipe.vae.enable_tiling()
#
video = pipe(
prompt="A soaring eagle gliding gracefully over snow-capped mountains at sunset.",
num_videos_per_prompt=1,
num_inference_steps=50,
guidance_scale=6
).frames[0]
#
export_to_video(video, "output_video.mp4", fps=8)
print("Video generation completed! Exported to output_video.mp4")
Paste any huggingface.co model, GGUF, or dataset URL into our converter to generate ready-to-run huggingface-cli, cURL, Wget, and Python commands.
π Related Engineering Guides
Download FLUX.1 Dev and Schnell 23GB weights fast via HF-Mirror. Step-by-step ComfyUI workflow setup, T5XXL/CLIP/VAE placement, and NF4 for 12GB GPUs.
Set up Stability AI Stable Diffusion 3.5 Large (8B) MMDiT in ComfyUI with FP8 quantization, T5XXL text encoders, and fast resumable HF-Mirror downloads.
Run Tencent HunyuanVideo 13B locally on a single 24GB GPU. Fast 54GB checkpoint download via HF-Mirror, Diffusers FP8 quantization, and CPU offloading.
Compare CosyVoice 2 and F5-TTS for 3-second zero-shot voice cloning, streaming low-latency TTS, cross-lingual synthesis, and fast HF-Mirror model setup.