Nodes/ComfyUI Inspire Pack/Scheduled CFGGuider (Inspire)
ComfyUI Node Runs on cloud

Scheduled CFGGuider (Inspire)

Ramp CFG down over sampling instead of holding it flat

By ltdrdata·Created 3 years ago·Updated 9 months ago· 805
Scheduled CFGGuider (Inspire)
  • model
  • positive
  • negative
  • sigmas
  • GUIDER
  • SIGMAS
from_cfg6.5
to_cfg1.0
schedulelog

Normal sampling holds CFG at one value the whole way through. This guider doesn't - it slides CFG from a starting value to an ending value over the course of sampling, along a curve you pick. You drop it into ComfyUI's custom-sampling flow as a GUIDER, in place of a fixed-CFG guider, and it does the ramp for you.

Why ramp CFG at all? The two ends of sampling want different things. Early on, high CFG locks in prompt adherence and composition - it's what makes the image actually match what you asked for. Later, that same high CFG tends to over-bake: crunchy contrast, blown highlights, that fried oversaturated look. Dropping CFG toward the end lets the model fill in natural detail instead of hammering the guidance. So a schedule that starts high and eases down gets you adherence and clean late-stage detail, which a single flat value has to compromise between.

How it works

If you've never used the SamplerCustomAdvanced side of ComfyUI, that's the context: instead of one monolithic KSampler, you assemble noise + sampler + sigmas + a guider, and this is a guider you can swap in. It reads the sigma schedule so it knows where you are in the sampling process, then interpolates CFG from from_cfg to to_cfg across those steps using the schedule curve. linear is a straight line; log drops fast early then eases; exp holds high and drops late; cos is a smooth S-curve. Same idea underlies Inspire's Scheduled PerpNeg CFGGuider - this is the plain-negative version without the Perp-Neg math.

The inputs and outputs that matter

  • from_cfg (default 6.5) and to_cfg (default 1) - CFG at the start and end of sampling. The defaults ramp from a normal-ish 6.5 down to nearly off, which is the whole point.
  • schedule (default log) - the curve between them: linear, log, exp, or cos. log drops fast then eases; exp holds high before a late drop. Worth trying a couple.
  • positive / negative - your conditioning, same as any guider.
  • sigmas - the noise schedule from your scheduler node; the guider aligns its ramp to these steps and passes them through.
  • model - the model to guide.

Outputs: GUIDER (feed it into SamplerCustomAdvanced) and SIGMAS (the passed-through schedule, so you can route it onward cleanly).

How to install it

ComfyUI Manager: search ComfyUI Inspire Pack, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Inspire-Pack

then restart. It's from Dr.Lt.Data (ComfyUI-Manager, Impact Pack).

Common issues & troubleshooting

Results look washed out or under-guided. to_cfg of 1 means guidance is nearly off by the end, so if the image drifts from the prompt late, raise to_cfg (try 2–3) or pick a schedule like exp that holds high CFG longer before dropping.

Nowhere to plug the GUIDER. This outputs a GUIDER, which only SamplerCustomAdvanced consumes. A plain KSampler has no guider input - build out the custom-sampling chain (noise / sampler / sigmas / guider) or use a normal KSampler with a fixed CFG instead.

Barely different from a fixed CFG. If from_cfg and to_cfg are close, there's almost no ramp - that's just a constant CFG with extra steps. Widen the gap to see the effect. The benefit shows up most when high early CFG was frying your details.

The ramp seems misaligned with my steps. Make sure the sigmas feeding this guider are the same schedule driving your sampler. If they differ, the CFG ramp won't line up with where sampling actually is.

Categorysampling/custom_sampling/guiders

Inputs (7)

NameTypeDefaultDescription
modelMODEL
positiveCONDITIONING
negativeCONDITIONING
sigmasSIGMAS
from_cfgFLOAT6.50–100
to_cfgFLOAT1.00–100
scheduleCOMBOlog4 options: linear, log, exp, cos

Outputs (2)

NameTypeDescription
GUIDERGUIDER
SIGMASSIGMAS