Nodes/AnimateDiff Evolved/CFG Extrasโ—†RescaleCFG ๐ŸŽญ๐Ÿ…๐Ÿ…“
ComfyUI Node Runs on cloud

CFG Extrasโ—†RescaleCFG ๐ŸŽญ๐Ÿ…๐Ÿ…“

RescaleCFG for AnimateDiff

By KosinkadinkยทCreated 3 years agoยทUpdated 8 days agoยท 3,519
CFG Extrasโ—†RescaleCFG ๐ŸŽญ๐Ÿ…๐Ÿ…“
  • prev_extras
  • CFG_EXTRAS
โ—„multiplier0.70โ–บ

RescaleCFG is the fix for a specific, recognizable failure mode: push CFG up for better prompt adherence and your image starts looking deep-fried - blown-out colors, crushed contrast, sometimes warped faces. That's classifier-free guidance amplifying not just "follow the prompt" but the overall magnitude of the prediction, and at high scales that magnitude drifts away from what the model was actually trained to produce. RescaleCFG corrects for it by rescaling the guided output back toward the statistical range (standard deviation) of the plain conditioned prediction, so you keep the adherence boost without the exposure blowout.

This node is AnimateDiff-Evolved's own implementation of that idea, built to plug into its CFG Extras chain rather than standing alone.

The one input that matters

  • multiplier - how much of the rescale to apply, 0 to 1, default 0.7. At 0 you get no correction (equivalent to not using this node); at 1 you fully match the guided output's spread to the conditioned prediction's. 0.7 is a reasonable middle ground - enough to tame burn without flattening the contrast CFG was giving you in the first place. If your output still looks blown out, nudge it up; if it starts looking flat and low-contrast, back it off.
  • prev_extras (optional) - chains in another CFG_EXTRAS node (like CFG Extrasโ—†PAG) so you can stack multiple CFG modifications before they reach a Custom CFG node.

Output is CFG_EXTRAS, which feeds into Custom CFG's cfg_extras input, which in turn feeds Sample Settings.

How to install it

Comes with the base pack - no separate install needed.

  • ComfyUI Manager - search AnimateDiff Evolved by Kosinkadink, install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved, restart.

Common issues & troubleshooting

You wired this in and nothing changed. Check that its CFG_EXTRAS output actually reaches a Custom CFG node's cfg_extras input, and that Custom CFG's output reaches Sample Settings, which in turn has to be connected into your active AnimateDiff model chain. This node does nothing sitting on its own in the graph - it only modifies CFG behavior once it's actually part of the sampling path.

You don't need this if your CFG is already sane. RescaleCFG is a fix for a specific problem (burn from high CFG), not a free quality boost. If you're running SD1.5-typical CFG values (5โ€“9) and not seeing overexposure, you likely don't need it - save the extra chain complexity for when you're deliberately pushing CFG higher than usual for adherence and paying for it in blown highlights.

Output looks flat or washed-out in the other direction. That's multiplier set too aggressively for your CFG level. RescaleCFG is a correction proportional to how far off the guided output's statistics drifted - at low CFG there's not much to correct, so a high multiplier there can over-flatten the image. Back it off, or only engage it when you're actually running elevated CFG.

CategoryAnimate Diff ๐ŸŽญ๐Ÿ…๐Ÿ…“/sample settings/cfg extras

Inputs (2)

NameTypeDefaultDescription
multiplierFLOAT0.700โ€“1โ€”
prev_extrasoptCFG_EXTRASโ€”

Outputs (1)

NameTypeDescription
CFG_EXTRASCFG_EXTRASโ€”