Nodes/ComfyUI-ppm/RescaleCFGPost
ComfyUI Node

RescaleCFGPost

The anti-burn CFG rescale, built to chain

By pamparamm·Created 2 years ago·Updated about 18 hours ago· 265
RescaleCFGPost
  • model
  • MODEL
multiplier0.70
alt_modefalse
sigma_start-1.00
sigma_end-1.00

RescaleCFG is one of those quietly load-bearing tricks a lot of good SDXL workflows use without making a fuss about it. High CFG pumps up the magnitude of the guided prediction, which is a big reason images get oversaturated and contrasty - the numbers literally get too big. Rescale CFG pulls that magnitude back toward what the conditioned prediction alone would have been, so you keep the prompt adherence but lose the deep-fried look. This is the ComfyUI-ppm version, rebuilt as a post-CFG function so it stacks with other CFG nodes instead of fighting them.

How it works

Classifier-free guidance mixes a conditioned and an unconditioned prediction and amplifies the difference. Crank the scale and the result drifts away from the natural statistics the model was trained on - the standard deviation of the latent balloons, and that shows up as blown highlights and neon color. RescaleCFG measures the standard deviation of the plain conditioned prediction and rescales the guided result to partly match it, blending between "raw high-CFG" and "renormalized" by a multiplier. It's cheap, it's well understood, and it's the single most common thing people reach for when SDXL output looks overcooked at a CFG they otherwise like.

ComfyUI ships a stock RescaleCFG node. So why this one? The Post part. Pamparamm rebuilt it as a post-CFG function specifically so you can chain it with the pack's other CFG tools - dynamic thresholding, a guidance limiter, renorm - without them clobbering each other's model patches. Plus this version adds a sigma interval, so you can restrict the rescale to part of the schedule.

The inputs that matter

  • multiplier (default 0.7) - how much rescale to apply. 0 = off (raw CFG), 1 = full renormalization. 0.5–0.7 is the community-standard range and the default is a good starting point. Higher pulls harder toward the conditioned statistics (flatter, safer); lower keeps more of the punchy high-CFG look.
  • alt_mode (default false) - an alternative rescale formula. Leave it off unless the default is doing something you don't like; then flip it and compare.
  • sigma_start / sigma_end (both default -1) - the noise window to apply the rescale in. -1 means "the whole range" - the interval is disabled and rescale runs across all steps, which is what you want almost always. Set real sigma values only if you specifically want to rescale in a limited part of the schedule.

MODEL in, MODEL out - it's a model patch, works with a plain KSampler.

Install

No models, no dependencies.

  • 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

Everything looks a bit flat now. You've pushed multiplier too high, or you're stacking it on top of a model that wasn't burning in the first place. Rescale trades vibrance for safety - at 1.0 it can wash things out. Back toward 0.5–0.7.

No effect on Flux / Z-Image / distilled models. Same story as every real-CFG tool: those run at CFG 1 with no live classifier-free guidance, so there's no magnitude blowup to rescale. This is an SD 1.5 / SDXL-family tool.

Stacking with other CFG nodes. That's the whole reason the Post variant exists, so go ahead - but change one thing at a time. Adding rescale and dynamic thresholding and a guidance limiter all at once and then tuning blind is how you end up with a muddy image and no idea which node did it.

Pack rule: erroring after a pack update? Delete and re-add the node.

Categorymodel_patches/unet

Inputs (5)

NameTypeDefaultDescription
modelMODEL
multiplierFLOAT0.700–1
alt_modeBOOLEANfalse
sigma_startFLOAT-1.00-1–10000
sigma_endFLOAT-1.00-1–10000

Outputs (1)

NameTypeDescription
MODELMODEL