Nodes/ComfyUI CogVideoX Wrapper/(Down)load CogVideo Model
ComfyUI Node Runs on cloud

(Down)load CogVideo Model

The one-click way into CogVideoX

By kijai·Created 2 years ago·Updated about a year ago· 1,547
(Down)load CogVideo Model
  • block_edit
  • lora
  • compile_args
  • model
  • vae
model
precisionbf16
quantizationdisabled
enable_sequential_cpu_offloadfalse
attention_modesdpa
load_devicemain_device

This is where a CogVideoX workflow starts. Point it at a model, hit run, and it pulls the weights straight from HuggingFace into ComfyUI/models/CogVideo and loads them, handing you a model and a VAE ready to feed the rest of the graph. No hunting for download links, no manual file placement. That "(Down)" in the name is the whole pitch: first run downloads, every run after that just loads from cache.

A little context so you know what you're getting into. CogVideoX (from THUDM, the Tsinghua lab) was the first open-source video model that regular people could actually run at home - back in August 2024 it proved local text-to-video was possible at all, and kijai's wrapper is what made it usable inside ComfyUI. That's the historical weight here. In 2026 the community's default for local video has moved on to Wan 2.2, so reach for CogVideoX when you specifically want it: a CogVideoX LoRA, a Fun/Tora feature, or an existing workflow built around it. The wrapper still works and the node set is complete.

What it loads

The model dropdown is the main decision, and there are 17 of them. The plain ones - THUDM/CogVideoX-2b, THUDM/CogVideoX-5b, THUDM/CogVideoX-5b-I2V - are the originals; 2b is the light one, 5b is the quality one, and the -I2V variant animates a starting image instead of going text-only. Then there's kijai's own CogVideoX-5b-1.5-T2V/-I2V (the 1.5 refresh), the CogVideoX-Fun-2b/-5b line from alibaba-pai (more resolutions and image-conditioning tricks), and CogVideoX-5b-Tora for trajectory-guided motion. Pick the one your workflow or LoRA was built for - they're not interchangeable.

The settings that actually matter for a beginner:

  • precision (default bf16) - leave it. bf16 is the sane default; only touch fp16/fp32 if you have a specific reason.
  • quantization (default disabled) - this is your VRAM lever. fp8_e4m3fn roughly halves the memory the transformer eats, which is often the difference between "fits" and "out of memory" on the 5b model. The torchao_* options are alternative quant backends; fp8 is the one most people use.
  • enable_sequential_cpu_offload - flip this on if you're still OOMing after fp8. It streams layers between CPU and GPU, so it's slower but lets a big model run on a small card.

The attention_mode dropdown offers sageattn variants if you've got SageAttention installed (a real speedup, but a pain to set up on Windows). The optional lora, block_edit, and compile_args inputs take the outputs of the LoRA-select, TransformerEdit, and torch-compile nodes respectively.

Two outputs: model (a COGVIDEOMODEL) goes to CogVideo Sampler, and vae goes to CogVideo Decode (and to the image-encode nodes if you're doing I2V). That single node hands you both halves of the pipeline.

How to install it

The README for this pack is bare, so here's the standard kijai-wrapper install:

  • ComfyUI Manager - search ComfyUI-CogVideoXWrapper, install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-CogVideoXWrapper, then pip install -r ComfyUI-CogVideoXWrapper/requirements.txt, and restart.

You don't download models separately - this node does it. Just know the 5b weights are several GB, so the first run has a wait.

Common issues & troubleshooting

Out of memory on the 5b model. Expected on anything under ~16GB. Set quantization to fp8_e4m3fn first; if that's not enough, add enable_sequential_cpu_offload. If you're on a genuinely small card, use the GGUF loader instead.

First run hangs "forever." It's downloading, not frozen - watch the console for the HuggingFace progress bars. Subsequent runs load from the cached files in ComfyUI/models/CogVideo and are quick.

Picked a model that doesn't match your workflow. An I2V model expects image conditioning; a Tora model expects a trajectory. If your prompt-only graph errors, make sure you didn't select an I2V or Fun-InP variant that's waiting for an image you never gave it.

CategoryCogVideoWrapper

Inputs (9)

NameTypeDefaultDescription
modelCOMBO17 options: THUDM/CogVideoX-2b, THUDM/CogVideoX-5b, THUDM/CogVideoX-5b-I2V, kijai/CogVideoX-5b-1.5-T2V, kijai/CogVideoX-5b-1.5-I2V, bertjiazheng/KoolCogVideoX-5b, +11
precisionoptCOMBObf16official recommendation is that 2b model should be fp16, 5b model should be bf16
quantizationoptCOMBOdisabledenabled casts the transformer to torch.float8_e4m3fn, fastmode is only for latest nvidia GPUs and requires torch 2.4.0 and cu124 minimum
enable_sequential_cpu_offloadoptBOOLEANfalsesignificantly reducing memory usage and slows down the inference
block_editoptTRANSFORMERBLOCKS
loraoptCOGLORA
compile_argsoptCOMPILEARGS
attention_modeoptCOMBOsdpa11 options: sdpa, fused_sdpa, sageattn, fused_sageattn, sageattn_qk_int8_pv_fp8_cuda, sageattn_qk_int8_pv_fp16_cuda, +5
load_deviceoptCOMBOmain_device2 options: main_device, offload_device

Outputs (2)

NameTypeDescription
modelCOGVIDEOMODEL
vaeVAE