HunyuanVideo CFG
Turning real negative prompting back on
- hyvid_cfg
HunyuanVideo is a guidance-distilled model - it has classifier-free guidance baked into its weights (that's what the sampler's embedded_guidance_scale input is), so it can produce well-guided output from a single forward pass instead of the traditional two. The tradeoff is that a real negative prompt - "don't show me X" - doesn't naturally apply the way it does on an older, non-distilled model. This node exists to bring that back: it runs true classifier-free guidance (a real conditional-plus-unconditional pass) for a slice of the schedule you choose, using an actual negative prompt.
It's a settings node, and its output plugs into the hyvid_cfg optional input on HyVideoI2VEncode - not directly into the sampler, which is easy to assume wrong if you're used to how CFG usually wires up.
The inputs that matter
negative_prompt- multiline text, and it ships with a genuinely useful default you can use as-is or as a template: "Aerial view, aerial view, overexposed, low quality, deformation, a poor composition, bad hands, bad teeth, bad eyes, bad limbs, distortion." That's the author's own tuned starting negative for this model.cfg(default 2) - the guidance scale for this real-CFG pass. Note this defaults lower than typical SD-era negative-prompt values (5-9); this model doesn't need much on top of its embedded guidance.start_percent/end_percent(0 to 1) - where in the schedule this applies. Outside that window, the model falls back to its baked-inguidance_embedsalone.batched_cfg- batches the conditional and unconditional pass instead of running sequentially. Faster, more VRAM.use_cfg_zero_star(default off here, unlike the TextEmbed Bridge node where it defaults on) - a CFG refinement aimed at an early-step artifact.
Output: hyvid_cfg.
How to install it
Ships with the pack - no separate download.
- ComfyUI Manager - search ComfyUI-HunyuanVideoWrapper, install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-HunyuanVideoWrapper, thenpip install -r ComfyUI-HunyuanVideoWrapper/requirements.txt, restart.
Common issues & troubleshooting
Wired it in but the negative prompt seems to have no effect. Double-check the output actually connects to hyvid_cfg on HyVideoI2VEncode, not directly on the sampler - this is the single most likely mistake, since most people expect a CFG node to attach where sampling happens.
Generation got noticeably slower after adding this node. That's the expected cost of real CFG: for the percentage of the schedule where it's active, the model runs a genuine conditional-plus-unconditional pass instead of relying on its cheap baked-in guidance. Narrow start_percent/end_percent to cover less of the schedule if the slowdown isn't worth it for your use case.
Cranking cfg high doesn't behave like it would on an SD-era model. This model already carries strong guidance from its embedded distillation; stacking a high real-CFG value on top can push things further than expected. Start near the default of 2 and nudge up in small steps rather than assuming SD-style values transfer directly.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| negative_prompt | STRING | Aerial view, aerial view, overexposed, low quality, deformation, a poor composition, bad hands, bad teeth, bad eyes, bad limbs, distortion | — |
| cfg | FLOAT | 2.000–100 | guidance scale |
| start_percent | FLOAT | 0.000–1 | Start percentage of the steps to apply CFG, rest of the steps use guidance_embeds |
| end_percent | FLOAT | 1.000–1 | End percentage of the steps to apply CFG, rest of the steps use guidance_embeds |
| batched_cfg | BOOLEAN | false | Calculate cond and uncond as a batch, increases memory usage but can be faster |
| use_cfg_zero_star | BOOLEAN | false | Use CFG zero star |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| hyvid_cfg | HYVID_CFG | — |