Nodes/advanced-cfg-controller/πŸ”§ CFG Post-Processing Only
ComfyUI Node

πŸ”§ CFG Post-Processing Only

The color-fix half of CFG tuning, with none of the CFG

By FlareAI-StudiosΒ·Created 8 months agoΒ·Updated 8 months agoΒ· 1
πŸ”§ CFG Post-Processing Only
  • model
  • MODEL
β—„subtract_latent_meantrueβ–Ί
β—„subtract_latent_mean_sigma_start1000.0β–Ί
β—„subtract_latent_mean_sigma_end7.5β–Ί
β—„latent_intensity_rescaletrueβ–Ί
β—„latent_intensity_rescale_methodHard Measurementβ–Ί
β—„latent_intensity_rescale_cfg8.0β–Ί
β—„latent_intensity_rescale_sigma_start1000.0β–Ί
β—„latent_intensity_rescale_sigma_end5.0β–Ί

Half of what the Advanced CFG Controller pack does has nothing to do with CFG at all. Its most universally useful tricks - fixing color drift and rescaling intensity so you don't get washed-out or oversaturated results - are post-processing steps applied to the denoised latent. CFG Post-Processing Only takes exactly those two fixes, drops every CFG-related knob, and hands you a clean little utility node. If the full Easy/Expert controllers scare you off, this is the pack's most approachable on-ramp.

What it does

It patches the model with two post-CFG functions, both of which run after the sampler produces its denoised prediction each step:

  • subtract_latent_mean (on by default) fixes color drift by centering the latent's values - the pack's answer to colors that slowly shift or green-cast during a long generation. It's active between subtract_latent_mean_sigma_start (1000) and subtract_latent_mean_sigma_end (7.5), i.e. it stops before the fine-detail low-sigma steps where recentering would do more harm than good.
  • latent_intensity_rescale (also on by default) rescales latent intensity against a target so you don't oversaturate or crush to gray. latent_intensity_rescale_cfg is that target - default 8, the pack's reference "good CFG" intensity. The latent_intensity_rescale_method dropdown (Soft Measurement, Hard Measurement, Range Based, Spectral Analysis) changes how intensity is measured; Hard is the default and fine to keep.

Both are gated by sigma windows, which is the part that trips people up. These are raw sigma values, not step numbers, and the 1000 "start" default gets clamped down to your model's actual max sigma (~14.6 on SDXL), so on a 20-step run the effective window is roughly the first third of denoising - the high-noise phase where drift actually accumulates. If you set the end value too high, the fix turns off early and drift creeps back; too low and it works into the detail steps, where it can flatten texture.

Wiring it up

Model in, patched MODEL out. Because it never touches the CFG function itself, it layers cleanly on top of your existing sampler - you don't even need another controller node. It's the sane drop-in when you liked the Easy node's color behavior but want to keep your own CFG, or when you're chasing "washed out" on a workflow that doesn't use the pack at all. The README's own troubleshooting points straight here: washed-out colors β†’ turn the rescale on (this node ships it pre-enabled) and set the target 9–10.

Install

It's part of the same pack, so one install covers everything:

cd ComfyUI/custom_nodes
git clone https://github.com/FlareAI-Studios/advanced-cfg-controller

Restart ComfyUI (or search Advanced CFG Controller in Manager). It shows up under model_patches/Advanced_CFG_Controller/utils. No models, no extra deps.

Two honest footnotes. First, this pack is brand new with no community track record, so the sigma defaults are the author's guesses - test the end values against your own sampler schedule. Second, if you later add the Expert controller into the same model path, remember the Expert has its own subtract_latent_mean and latent_intensity_rescale toggles; stacking both doubles up the fix and over-corrects. Use one or the other, not both.

Categorymodel_patches/Advanced_CFG_Controller/utils

Inputs (9)

NameTypeDefaultDescription
modelMODELβ€”
subtract_latent_meanBOOLEANtrueFix color drift by centering latent values
subtract_latent_mean_sigma_startFLOAT1000.00–10000Start color correction at this sigma level
subtract_latent_mean_sigma_endFLOAT7.50–10000Stop color correction at this sigma level
latent_intensity_rescaleBOOLEANtrueRescale latent intensity to prevent oversaturation
latent_intensity_rescale_methodCOMBOHard MeasurementMethod for measuring latent intensity
latent_intensity_rescale_cfgFLOAT8.00–100Target intensity level for rescaling
latent_intensity_rescale_sigma_startFLOAT1000.00–10000Start rescaling at this sigma level
latent_intensity_rescale_sigma_endFLOAT5.00–10000Stop rescaling at this sigma level

Outputs (1)

NameTypeDescription
MODELMODELβ€”