RenormCFGPost
Rein in runaway CFG magnitude
- model
- MODEL
RenormCFG is the less-famous cousin of RescaleCFG, and it solves a related problem: guidance that pushes the prediction's magnitude too far and blows out the image. Where rescale gently pulls the guided output's standard deviation back toward the conditioned prediction, renorm clamps the norm of the guidance itself - it caps how big the guided step is allowed to get. If you've seen it in Lumina or other newer-model workflows, that's where it comes from; this is the ComfyUI-ppm version, packaged as a post-CFG function so it chains with the pack's other CFG nodes.
How it works
Classifier-free guidance produces a correction vector - the difference between the conditioned and unconditioned predictions, scaled by CFG. At high guidance that vector's magnitude can grow past what the model handles gracefully, and you get the familiar oversaturation and contrast crunch. RenormCFG renormalizes that: it measures the norm of the guided prediction and rescales it so it doesn't exceed a target set by renorm_cfg. The structure and direction of the guidance survive; only the runaway magnitude gets clipped. It's a slightly different lever than rescale - norm-based rather than standard-deviation-based - and some models respond better to one than the other.
The Post naming, as with the rest of this pack's CFG nodes, means it's built as a post-CFG function so it composes cleanly with dynamic thresholding, rescale, and a guidance limiter rather than stomping on their patches.
The inputs that matter
- renorm_cfg (default 1) - the renormalization target: how much magnitude to allow through. This is the main knob. Higher lets more guidance magnitude survive (closer to raw CFG); lower clamps harder toward tame output. Tune it against your actual CFG.
- sigma_start / sigma_end (both default -1) - the noise window to apply renorm in. -1 on both means "apply across the whole schedule" - the interval is off by default, which is the normal setting. Give them real sigma values only if you want to restrict renorm to part of the run.
MODEL in, MODEL out. It's a model patch, so a plain KSampler is fine - no advanced sampler needed.
Install
No models, no dependencies - sampling math.
- ComfyUI Manager: search "ComfyUI-ppm", install, restart.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/pamparamm/ComfyUI-ppm, then restart.
Common issues & troubleshooting
Rescale or renorm - which do I use? Honest answer: try both and keep the one that looks better on your model. RescaleCFGPost is the more widely used, better-known default for SDXL; RenormCFG is worth a shot when rescale isn't quite fixing the burn, or on newer models where it's the technique that shipped with the architecture. Don't run both hard at once without a reason - you'll double-clamp into mush.
No effect on distilled models. Flux, Z-Image Turbo, anything at CFG 1 - no live classifier-free guidance means no magnitude to renormalize. This targets the real-CFG regime.
Over-clamping. Set renorm_cfg too aggressively and you'll flatten contrast and dull the colors. If the image looks lifeless after adding this, loosen the target back up.
Pack rule from the author: if the node errors after a pack update, delete it and re-add it to clear stale state.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| renorm_cfg | FLOAT | 1.000–100 | — |
| sigma_start | FLOAT | -1.00-1–10000 | — |
| sigma_end | FLOAT | -1.00-1–10000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |