CFG-Renorm (Qin et al. 2025; Lumina-Image 2.0)
A leash on the guidance vector, in one number
- model
- MODEL
If you've ever loaded a Lumina-Image 2.0 or Qwen-Image workflow and wondered what the stray
cfg_renorm settings were doing there, this is it. CFG-Renorm (Qin et al., arXiv 2025, and used in
Lumina-Image 2.0 after the STIV work) is the barest useful correction in this pack, and it's one I'd
hand to someone who has never touched a guidance tweak before: it takes exactly one number to
understand, and it cannot produce a weird image on its own.
The mechanism
Plain CFG produces a guided prediction. Take its norm - the length of the vector, over the whole
latent. Take the conditional prediction's norm. If the guided one is longer than rho times the
conditional one, scale the whole thing down until it isn't. If it's already inside the cap, change
nothing.
That's it. No percentiles, no per-pixel work, no history. It's a governor, not a redirection: the
guidance still points exactly where it pointed, it just isn't allowed to grow without bound. At
rho = 1 the guided prediction can never be longer than the conditional one; the paper's useful
band is roughly 1 to 1.5, which is loose enough to leave normal steps alone and tight enough to catch
the steps where CFG is about to go nuclear.
The reason this works is that CFG's saturation problem is largely a norm problem. As the scale rises, the guided vector keeps stretching, and the denoiser spends the rest of the run trying to correct for an overshoot. Capping it keeps the arithmetic in the range the model actually expects.
Inputs and output
- model - the wire from your checkpoint or LoRA loader.
- scale (default -1) -
-1uses the KSampler's cfg. Renorm is on top of CFG, so you still set the guidance scale in the usual place; this node only trims the result. - rho (default 1) - the cap as a multiple of the conditional prediction's norm.
0turns the node off entirely (an easy A/B switch). The published sweet spot is 1–1.5: start at 1, and if your images have gone soft or lost contrast, walk up toward 1.5 before you blame the prompt. - space -
autocomputes it in the method's own space (noise prediction for this one).
The output is a single MODEL, dropped between the loader and the KSampler like any other patch.
Install
# ComfyUI Manager: search "CFG Megapack" -> Install -> restart
# or:
comfy node install comfy-cfg-megapack
# or by hand:
cd ComfyUI/custom_nodes && git clone https://github.com/AbstractEyes/comfy-cfg-megapack
Nothing beyond ComfyUI itself: no requirements.txt, no model files. It needs ComfyUI 0.38 or
newer, and it uses comfy_api.latest, so on an older install the pack just won't appear.
The pack context you need
The Megapack is a decomposition of guidance into seven stages, with one node per stage plus 50 nodes named after individual papers. CFG-Renorm is a mix node - it changes how the conditional and unconditional predictions become one prediction, which is stage 3 of seven. Two rules about that:
- A later mix node replaces an earlier one rather than stacking. If you have both CFG-Renorm and APG on the same model wire, only the last one chained is doing anything.
- Corrections (the
CFG Correctnode and its paper equivalents) do stack. Renorm here is a mix-time cap, not a correction, even though the two feel similar. If you want a stackable version, look atCFG Correct: Magnitudewithnorm_cap- that's PMC-CFG's version of the same idea, applied as a post-correction.
The one trap that applies everywhere in this pack: its hook sets ComfyUI's
disable_cfg1_optimization flag, because every rule it ships needs the unconditional prediction to
exist. At CFG 1 - the default on every 2026 guidance-distilled model - ComfyUI normally skips the
unconditional pass and half your render time goes away. Any pack node on the model wire brings that
pass back, and at CFG 1 these rules also have nothing to correct (w = 1 means no guidance to scale
back). Use this on SDXL, SD1.5 and non-distilled bases running CFG 4–9, not on your Turbo
checkpoints.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| scale | FLOAT | -1.0-1–100 | The guidance scale w for this rule. -1 uses the sampler's cfg value. |
| rho | FLOAT | 1.000–5 | The cap as a multiple of ||c|| (0 = off; 1-1.5 used). |
| space | COMBO | auto (the method's own) | Where the rule is computed. Linear rules give the same image in any space; nonlinear ones do not. 'auto' uses the space the method was published in (noise for most, denoised for APG and the angle rule, velocity for flow models). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |