Skimmed CFG - Difference CFG
Pull back exactly what high CFG overshot
- model
- MODEL
Most anti-burn nodes in the Skimmed_CFG pack locate the conflict between positive and negative predictions and cap it. Difference CFG is the analytical one: it works out how far your sampler's CFG overshoots a gentler reference scale, and only corrects the parts that went too far. Same family, different philosophy - it's the variant you reach for when the blunt skims feel like they're shaving off too much character.
How it works
At each step the node computes the CFG result twice - once at your sampler's scale, once at the reference_cfg scale - and takes the absolute difference between them, normalized to a 0–1 weight per latent position. Where the two scales agree, it changes nothing; where they diverge, it blends the uncond prediction back in to rein the overshoot toward the reference behavior. The method input shapes that weight:
- linear_distance (default) - straight normalized difference.
- squared_distance - squares it, so the correction hammers the worst offenders and leaves mild overshoot alone.
- root_distance - square root, spreading the correction more evenly.
- absolute_sum - normalizes by the total L1 magnitude of the predictions rather than the per-position difference, which behaves like an overall scale governor.
end_at_percentage defaults to 0.8, meaning the correction runs for the first 80% of denoising and backs off for the final refinement - the sensible default, and adjustable to 1.0 if you want it all the way through.
The inputs
- model - MODEL in.
- reference_cfg (default 5, 0–10) - the reference scale to compare against.
- method - the four-option combo above.
- end_at_percentage (default 0.8) - 0 disables the correction entirely.
Output: a patched MODEL for the KSampler.
Install
Part of Extraltodeus/Skimmed_CFG - single Python file, zero pip dependencies, no model downloads. ComfyUI Manager: search "Skimmed_CFG" (Extraltodeus), install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Extraltodeus/Skimmed_CFG
Restart after either.
Caveats
- Needs CFG above 1. No unconditioned pass at CFG 1, so it's a no-op on guidance-distilled models at default settings - SD/SDXL-lineage with the sampler CFG raised is the working regime.
- It's the current name for what used to be "Skimmed CFG - Difference CFG"; old workflows using that name can flag missing after the January 2026 rename, and this node is the drop-in.
If you've been burned by skims that over-correct, the root_distance or linear methods here are worth an A/B on a fixed seed.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| reference_cfg | FLOAT | 5.00–10 | The reference CFG scale to compare against. |
| method | COMBO | linear_distance | The method to calculate the difference. |
| end_at_percentage | FLOAT | 0.800–1 | Relative to the step progression. 0 means disabled, 1 means active until the end. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |