Nodes/ComfyUI/RenormCFG
ComfyUI Node Runs on cloud

RenormCFG

The fix for Lumina 2's bloated, oversaturated high-CFG output

By Comfy-Org·Created 4 years ago·Updated about an hour ago· 129,962
RenormCFG
  • model
  • MODEL
cfg_trunc100.00
renorm_cfg1.00

RenormCFG exists because classifier-free guidance on the Lumina 2 architecture has a specific failure mode: crank the CFG scale up and you don't just get more prompt adherence, you get colors that bloom until the image looks radioactive. This node applies a renormalization step that lets you push CFG hard without letting the prediction run away. It's one of the rare patch nodes you'll encounter almost exclusively inside Lumina 2 workflows, and it does one job well.

If you're not running Lumina 2, you can safely stop reading now. If you are, this is the difference between a usable high-guidance render and a pile of melted pixels.

How it works

Normal CFG computes uncond + scale * (cond - uncond) and calls it a day. RenormCFG does the same, then checks the magnitude of the result against the magnitude of the plain conditional prediction and clamps it. The renorm_cfg factor sets the ceiling: if the guided prediction's norm would exceed renorm_cfg times the unguided positive norm, it gets scaled back down to that bound. Guidance still points the model in the right direction - it just can't blow out the magnitude, which is what causes the oversaturation.

Reading the source (it lives in comfy_extras/nodes_lumina2.py), a few details matter:

  • It operates on the noise/eps prediction channels separately from the rest of the model output - the in_channels split - so it only renormalizes the part of the prediction that actually guides.
  • cfg_trunc gates when it runs. Above that timestep threshold it just falls back to plain conditional sampling (no CFG applied at all); below it, the full guidance-plus-renormalization kicks in.

So the mental model is: early denoising runs on the pure conditional, late denoising runs with guided-but-capped CFG. That's exactly the behavior that keeps composition strong while taming the detail-phase overshoot.

Inputs and what to set

Three inputs, one of them you actually touch:

  • model - the Lumina 2 model to patch.
  • cfg_trunc - float, default 100, in timestep units. With the default at 100, the gate basically never triggers for typical schedules, meaning CFG runs the whole way. Lower it if you want the "pure conditional early" behavior to actually happen.
  • renorm_cfg - float, default 1.0. This is the cap: 1.0 means "guided output can't exceed the unguided magnitude," which is the standard anti-burn setting. Values above 1.0 allow more headroom; values below clamp harder.

The single output is the patched MODEL, fed to the sampler. It ships inside ComfyUI core - no install, no model files.

Common issues & troubleshooting

Set it and forget it only if you keep CFG modest. The renormalization makes high CFG safe, not free. If you're the type who runs CFG 8 because you want maximum adherence, expect to also raise steps - the cap tames color but doesn't add detail.

It's a sampler-CFG patch, so it interacts with other CFG patches. Chain order matters; if a workflow also applies RescaleCFG or a custom guider, only one sampler-CFG function effectively runs per step in some arrangements. Check which node sits closest to the sampler and let that one win.

Wrong model family, no effect. This ships from the Lumina 2 code path for a reason - its channel-split logic is tuned to that architecture's output layout. On an SDXL-era model it may do nothing useful, so don't sprinkle it on workflows that don't need it.

Categorymodel/patch

Inputs (3)

NameTypeDefaultDescription
modelMODEL
cfg_truncFLOAT100.000–100
renorm_cfgFLOAT1.000–100

Outputs (1)

NameTypeDescription
MODELMODEL