Nodes/ComfyUI-HunyuanVideoWrapper/HunyuanVideo VAE Loader
ComfyUI Node Runs on cloud

HunyuanVideo VAE Loader

The piece that turns latents into pixels

By kijai·Created 2 years ago·Updated 12 months ago· 2,594
HunyuanVideo VAE Loader
  • compile_args
  • vae
model_name
precisionbf16

A simple loader, doing one job: it loads HunyuanVideo's VAE from ComfyUI/models/vae and hands out a VAE object for HyVideoEncode and HyVideoDecode to use. The reason this gets its own node instead of reusing ComfyUI's stock VAE loader is that HunyuanVideo's VAE isn't interchangeable with an image model's VAE - it's a 3D causal VAE, meaning it compresses across time as well as space, which is what lets the whole pipeline turn a stack of latent frames into a coherent video instead of a sequence of unrelated images.

The inputs that matter

  • model_name - the VAE file, picked from ComfyUI/models/vae. There's no auto-download; per the README, the VAE is a single file you get manually from Kijai's HunyuanVideo_comfy repository on HuggingFace, alongside the diffusion transformer.
  • precision (default bf16) - matches the sensible default everywhere else in this pack.
  • compile_args - optional, from HyVideoTorchCompileSettings. Yes, the VAE itself can be torch.compiled, same as the main transformer - worth trying if decode is a meaningful chunk of your total generation time and you already have Triton set up.

Output: vae.

How to install it

Ships with the pack - no separate download for the node.

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

The VAE weight file itself is the part you have to fetch by hand: go to Kijai/HunyuanVideo_comfy on HuggingFace, grab the VAE file, and drop it into ComfyUI/models/vae. The README is explicit that neither this nor the diffusion transformer auto-downloads - only the LLM and CLIP text encoders do.

Common issues & troubleshooting

The model_name dropdown is empty. No auto-download for this file - you have to grab it manually from Kijai's HunyuanVideo_comfy HuggingFace repo and place it in models/vae, then restart ComfyUI or trigger a rescan.

Decode produces garbage or wildly wrong colors. You've likely loaded the wrong VAE for the model - an SD, SDXL, or Flux VAE is not compatible with HunyuanVideo's 3D causal VAE, and ComfyUI won't necessarily stop you from wiring the wrong one in. Confirm the file came from Kijai's HunyuanVideo repo specifically.

Compile args connected but no speedup on decode. VAE decode is a relatively small fraction of total generation time compared to sampling itself, so a compiled VAE saves less than a compiled transformer would. It's a reasonable thing to try, but don't expect it to be the dominant lever if overall speed is your goal - that's HyVideoTorchCompileSettings on the model loader, plus HyVideoTeaCache on the sampler.

CategoryHunyuanVideoWrapper

Inputs (3)

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

Outputs (1)

NameTypeDescription
vaeVAE