CFG-Zero* Scaled (CCN)
Rescue oversaturated Wan and Flux without touching the sampler
- model
- MODEL
If you've pushed CFG past ~3 on a distilled model like Wan and watched the image burn into a saturated mess, you've hit the problem this node exists for. Vanilla CFG rescales the difference between the conditional and unconditional predictions, and on guidance-distilled models that correction overshoots badly. CFG-Zero* (from WeichenFan's CFG-Zero-star repo) is a cleaner fix: instead of using the raw uncond prediction as your anchor, it rescales the uncond term by an optimal projection coefficient so the guidance pulls in the right direction without overshooting. This node is that technique with a strength dial and a scaled init, so you can ease into it instead of committing fully.
How it works
It patches the model's CFG function, so you wire the MODEL through it into your sampler and it acts as a drop-in CFGGuider-style patch - no workflow rewire. The math, from the source:
- Vanilla CFG:
uncond + scale * (cond - uncond) - CFG-Zero*:
uncond * α + scale * (cond - uncond * α), whereα = dot(cond, uncond) / ||uncond||²
strength lerps between the two - 0.0 is plain vanilla CFG, 1.0 is full CFG-Zero*. It's unclamped, so you can overshoot past 1 for experimentation. The "scaled init" part is the author's addition for Wan: the original paper zeroes the very first step's prediction, which can kill early frames; here use_scaled_init + init_scale + init_steps let you dampen the prediction over the first N steps instead of eliminating it. init_scale = 0.0 reproduces the paper's zero-init; 1.0 means no effect; values between attenuate.
The inputs that matter
model is what you patch, strength is the main dial (start at 1.0 for full CFG-Zero*, back off if you want to keep more vanilla character), and the init trio is for Wan-style runs where the first frames otherwise collapse. Output is the patched MODEL clone - the original is untouched, and you can bypass the node to A/B against plain CFG.
Install
ComfyUI Manager → search ComfyCollectorNodes → Install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/valkymaera/ComfyCollectorNodes
Restart, no pip step (no extra Python deps). Look for it under the (CCN) suffix nodes.
Honest caveats
This is squarely in the pack's experimental bucket, and the author says so outright. CFG-Zero* only does anything when real CFG is active - on a model running at CFG 1 the uncond pass isn't even computed, so the whole patch is a no-op there. It shines on the models that do run real CFG but fight you above ~3 (Wan video is the community's usual target). The community signal is thin - the pack itself only has the author's announcement thread on r/comfyui as of mid-2026 - so treat this as a tinkerer's tool, not a settled best practice. Set init_steps too high with init_scale near 0 and you'll dampen frames you actually wanted, so keep the init range small and test. If a few CFG points above 1 burn your output, this is one of the few patches that attacks the cause instead of papering over it.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| strength | FLOAT | 1.000 | Lerp between vanilla CFG (0.0) and CFG-Zero* (1.0). Unclamped for experimentation. |
| use_scaled_init | BOOLEAN | true | — |
| init_scale | FLOAT | 0.000 | Multiplier for init steps. 0.0 = original zero-init, 1.0 = no init effect. |
| init_steps | INT | 0 | Init applies from step 0 through this step index (inclusive). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |