CFG Guider
Your prompt, turned into guidance, as an object
- model
- positive
- negative
- GUIDER
This node is the "prompt steering" part of the sampler, extracted into a box you can hold. It takes your model, your positive and negative conditioning, and a cfg value, and produces a GUIDER object - the thing that decides how hard each denoising step is pulled toward your prompt. You don't use it alone. You hand its output to SamplerCustomAdvanced, which runs the actual denoising.
It ships with ComfyUI core (comfy_extras.nodes_custom_sampler). Nothing to install.
How it works
Guider is ComfyUI's word for "whatever decides the guidance between steps." CFG Guider implements the classic one: classifier-free guidance. Each step, the model predicts twice - once conditioned on your positive prompt, once on the negative - and CFG amplifies the difference:
uncond_pred + (cond_pred - uncond_pred) * cfg
Higher cfg means the model obeys the prompt harder, up until it starts burning (oversaturated color, face deformation, eventually noise). The cfg widget here is the exact same dial as the one on KSampler; it's just been moved into a dedicated object because the custom-sampler graph separates concerns.
One mechanical detail worth knowing: at exactly cfg = 1, the unconditional pass isn't computed at all - the math cancels it out, so ComfyUI skips that entire forward pass. That's the built-in speed win, and it's why CFG 1 is the default on guidance-distilled models. Below 1 is the CFG++ regime, which needs the unconditional prediction, and the _cfg_pp samplers force it back on.
The inputs
- model - the checkpoint.
- positive - the conditioning you want to pull toward.
- negative - the conditioning you want to steer away from.
- cfg - the strength, 0–100, default 8. Remember the range is architecture-specific: 5–9 on SD 1.5/SDXL, 4–6 on Pony/Illustrious, ~1 on distilled models. And at CFG 1 the negative prompt does nothing, because there's no unconditional pass for it to attach to.
Output is a single GUIDER that goes into SamplerCustomAdvanced's guider input.
When to reach for it
Whenever you're building the custom-sampler graph and you want classic CFG with a negative prompt. It's the default guider for most workflows, and it's the one most workflow authors mean when they say "just use a normal sampler setup."
Where people get tripped up
- There's no
denoisehere. People come looking for it - it lives on the scheduler side, not the guider side. - Changing
cfgon the guider doesn't change the sampler. If your sampler is a_cfg_ppvariant, it reinterprets guidance; see SamplerEulerAncestralCFG++ before assuming your CFG box behaves normally. - If you don't need a negative at all - a guidance-distilled Flux-style model, or a model that has no unconditional pass - use BasicGuider instead. It's the same idea minus two inputs you'd otherwise leave hanging.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| cfg | FLOAT | 8.00–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| GUIDER | GUIDER | — |