C2FG: exponentially growing guidance (Gao et al. 2026)
Guidance that doubles itself by the last step
- model
- MODEL
Every schedule in every UI I've used goes the same direction: strong guidance early, weak or off late. You can find a dozen tutorials explaining why - the picture is decided early, the late steps are about texture, don't let CFG crank the contrast on an image that's already right.
C2FG (Gao et al., arXiv 2026) does the opposite. The scale grows over the run, exponentially:
w · exp(rate · (1 - t)), where t is the noise level. At t = 1 (the start, maximum noise) the
multiplier is exactly 1, so the scale starts at whatever you set. At t = 0 (the finish) it's
exp(rate) times that. With the default rate of 0.693 - which is ln 2, and that's not a
coincidence - the scale you asked for has doubled by the end of the render.
The argument for it is a coherent one: at the start, the latent is noise and a large conditional
push mostly injects structure the model will fight later. Near the end, the sample is nearly an
image, the conditional prediction is well-formed, and pushing adherence hard costs less. Whether you
buy it is a matter of taste - and of how your sampler's schedule maps to noise level, since the curve
is defined on t, not on step index.
Inputs
Unusually short, even for this pack:
- model - the model wire, before the sampler.
- rate (default 0.693, range 0 to 3) - the growth rate.
ln 2 ≈ 0.693doubles the scale by the end;0is a flat scale (plain CFG, and a useful control); 0.2 is the value the pack's tooltip cites for SD1.5 and SD3.5, which is a gentle 1.22x ramp. Anything near the top of the range means the final steps run at several times your sampler's cfg, and if the finish of your image looks crunchy rather than sharp, that's the first number to bring down.
Note what isn't here: no scale, and no space. C2FG takes the sampler's cfg as its base rather
than offering an override, and the schedule is defined on the noise level the sampler reports, so
there's nothing to choose. Set your base scale on the KSampler as usual.
Output: a MODEL.
Install
# ComfyUI Manager: search "CFG Megapack" -> Install -> restart
# or:
comfy node install comfy-cfg-megapack
# or by hand:
cd ComfyUI/custom_nodes && git clone https://github.com/AbstractEyes/comfy-cfg-megapack
No dependencies, nothing to download, ComfyUI ≥ 0.38.
The thing to watch on flow models
The curve is written on the noise level t, and the pack is careful about this: it handles
flow-matching models (Anima, the Cosmos-Predict2 family) with a different noise parameterization than
SDXL, sigma = 3t / (1 + 2t) with a timestep shift, and its window percentages are the shift-aware
sort ComfyUI itself uses. So the same rate does not produce the same curve on a UNet and on a flow
transformer - the shape of the run differs. If you're moving a C2FG setting between SDXL and Anima,
expect to retune rather than port.
Two more things worth knowing before you spend an evening on this. It writes the when stage, so a
later schedule node replaces it (CFG When: Schedule and Window also carries a c2fg_exp shape with
a shape_a rate input, which composes better if you want a window as well). And the pack always runs
the unconditional pass - the hook sets disable_cfg1_optimization - so on a 2026 distilled model at
cfg 1 there's no guidance for the curve to grow, and you've given up the second-pass shortcut for
nothing.
Where this is genuinely fun: rendering at a low base cfg with a fat rate, so the composition steps
stay gentle and the last third of the run pushes adherence. It's a different trade from every
"decreasing" schedule you've used, and the pack's probe node will show you the per-step scale if you
want to see the exponential actually happening instead of taking the formula on faith.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| rate | FLOAT | 0.690–3 | Growth rate (ln 2 doubles the scale by the end; 0.2 on SD1.5 / SD3.5). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |