Nodes/ComfyUI CogVideoX Wrapper/CogVideoX Model Loader
ComfyUI Node Runs on cloud

CogVideoX Model Loader

Load your own CogVideoX weights from disk

By kijai·Created 2 years ago·Updated 12 months ago· 1,549
CogVideoX Model Loader
  • block_edit
  • lora
  • compile_args
  • model
model
base_precisionbf16
quantizationdisabled
load_devicemain_device
enable_sequential_cpu_offloadfalse
attention_modesdpa

This is the "I already have the file" loader. Where the (Down)load CogVideo Model node reaches out to HuggingFace and grabs weights for you, this one loads a CogVideoX transformer you've already got sitting in your models folder - a fine-tune you downloaded yourself, a converted checkpoint, whatever. If you want control over exactly which file loads, this is the node.

CogVideoX itself is worth a quick orientation: it's THUDM's open text-to-video model, the one that first made local video generation actually runnable on consumer hardware back in 2024. kijai's wrapper is the ComfyUI front end for it. The community has largely moved to Wan 2.2 for general local video since, so you'd use this node when you're deliberately in CogVideoX-land - a specific model, LoRA, or workflow that wants it.

How it differs from the download node

One difference matters most: this node outputs only the model, not the VAE. The download node hands you both; this one hands you a bare COGVIDEOMODEL. So you pair it with a separate CogVideoX VAE Loader to get the VAE that CogVideo Decode needs. That's the trade - you pick the transformer file yourself, and you're on the hook for wiring up the VAE too.

The model dropdown lists whatever's in your CogVideo models directory, so if it's empty, you haven't put a file there yet. That's the number-one gotcha with this node versus the auto-download one.

The inputs that matter

Most of the controls mirror the download node, and the defaults are good:

  • base_precision (default bf16) - leave it unless you know you need otherwise.
  • quantization (default disabled) - your VRAM lever. fp8_e4m3fn cuts the transformer's memory roughly in half, which is what gets the 5b model onto a mid-range card. fp8_e4m3fn_fast trades a little accuracy for speed; the torchao_* options are alternative quant backends.
  • enable_sequential_cpu_offload - the fallback when fp8 still isn't enough. Streams layers CPU↔GPU, slower but survivable on small VRAM.
  • load_device (main_device / offload_device) - where the weights land. Default is fine for most setups.

Optional lora (a COGLORA from the LoraSelect node), block_edit, compile_args, and the attention_mode dropdown (with SageAttention options if you have it installed) round it out. Output is the single model, which goes into CogVideo Sampler.

How to install it

The pack README is empty, so here's the standard 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, restart.

Since this node doesn't download anything, put your CogVideoX transformer file in the folder ComfyUI scans for it first, or the dropdown stays empty.

Common issues & troubleshooting

The model dropdown is empty. No file in the folder. Either drop your CogVideoX weights into the models directory, or just use (Down)load CogVideo Model and let it fetch one for you - that's honestly the easier path unless you have a specific local file to load.

Decode errors or a garbled video. You probably forgot the VAE. This node doesn't output one, so you need a CogVideoX VAE Loader feeding CogVideo Decode. Mismatched or missing VAE is the classic "why is my output noise" cause.

Out of memory. Same playbook as everywhere in this pack: fp8_e4m3fn first, then enable_sequential_cpu_offload, then consider the GGUF loader for the smallest cards.

CategoryCogVideoWrapper

Inputs (9)

NameTypeDefaultDescription
modelCOMBOThese models are loaded from the 'ComfyUI/models/diffusion_models' -folder
base_precisionCOMBObf163 options: fp16, fp32, bf16
quantizationCOMBOdisabledoptional quantization method
load_deviceCOMBOmain_device2 options: main_device, offload_device
enable_sequential_cpu_offloadBOOLEANfalsesignificantly 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

Outputs (1)

NameTypeDescription
modelCOGVIDEOMODEL