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

CogVideoX VAE Loader

The missing VAE for the model-only loader

By kijai·Created 2 years ago·Updated 12 months ago· 1,549
CogVideoX VAE Loader
  • compile_args
  • vae
model_name
precisionbf16

Small node, specific job: it loads a CogVideoX VAE from ComfyUI/models/vae and hands it to the rest of your graph. The VAE is the piece that converts between pixels and the compressed latent space the model actually works in - you need it on the way in (encoding a start image for I2V) and on the way out (decoding the sampler's latents into frames). Without a VAE, CogVideo Decode has nothing to decode with.

You'll reach for this node in one situation above all: when you loaded your transformer with CogVideoX Model Loader, which outputs only a model and no VAE. That loader deliberately leaves the VAE to you, and this is how you supply it. If you used one of the (Down)load nodes instead, they already hand you a VAE and you can skip this entirely.

The inputs that matter

There's really just one decision:

  • model_name - the dropdown of VAE files in ComfyUI/models/vae. Empty dropdown means no VAE file there yet. It has to be a CogVideoX VAE - the VAE is model-family-specific, so a Flux or SDXL VAE won't work here.
  • precision (optional, default bf16) - leave it. bf16 is the sane default; the other options are for edge cases.
  • compile_args (optional) - takes a torch-compile bundle if you're optimizing for speed. Skip it unless you're already using compile elsewhere.

The single output, vae (a standard VAE), goes wherever a VAE is needed: the vae input on CogVideo Decode, and on the image-encode nodes if you're doing image-to-video.

How to install it

Ships with the wrapper:

  • 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.

You'll need to place a CogVideoX VAE file in ComfyUI/models/vae yourself - this node loads, it doesn't download.

Common issues & troubleshooting

The dropdown is empty. No VAE file in ComfyUI/models/vae. Either put one there, or - honestly the simpler route - use a (Down)load CogVideo Model node that fetches the matching VAE alongside the transformer, and drop this node from the graph.

Output decodes to noise or wrong colors. The VAE doesn't match the model. A CogVideoX VAE has to go with a CogVideoX transformer; grabbing a random video VAE from another model family will decode to garbage. When in doubt, use the VAE that came bundled with your model download.

Do I even need this node? Only if your model loader didn't give you a VAE. The download loaders do; the model-only loader doesn't. That's the whole decision tree.

CategoryCogVideoWrapper

Inputs (3)

NameTypeDefaultDescription
model_nameCOMBOThese models are loaded from 'ComfyUI/models/vae'
precisionoptCOMBObf163 options: fp16, fp32, bf16
compile_argsoptCOMPILEARGS

Outputs (1)

NameTypeDescription
vaeVAE