SamplerWrapperCFGPP
Bolt CFG++ guidance onto any sampler
- sampler
- SAMPLER
CFG++ is a smarter way to apply guidance: instead of the classic uncond + scale × (cond − uncond) extrapolation, it recombines the conditional and unconditional predictions in closed form using the unconditional prediction from the next sigma. It gives you prompt control at much lower effective CFG, which is why it became the community's answer for models where high CFG burns the image - Chroma and the flow-matching family among them.
This node is how you use CFG++ in ComfyUI without switching to a specialist pack. It's a sampler wrapper: you feed it any SAMPLER, and it returns a new sampler that runs the inner one but replaces its denoised output with the CFG++ recombination at every step.
How it works
The wrapper installs a post_cfg_function hook on the model that captures the inner sampler's uncond_denoised, then hands control to a proxy model that computes the CFG++ formula:
denoised_star = (sigma · alpha_t · denoised_guided − sigma_next · alpha_s · uncond_denoised)
/ (sigma − sigma_next)
where alpha_s and alpha_t come from the half-log-SNR at each sigma. That's the paper's recombination, implemented faithfully. One detail that matters: ComfyUI skips computing the unconditional pass when CFG is exactly 1.0 - that's a free speedup on normal samplers. CFG++ needs that prediction, so the wrapper explicitly opts back into computing it. No silent "why is my negative doing nothing" mystery here.
A quirk to know up front: this wrapper is not in the standard KSampler sampler dropdown. The pack deliberately keeps it out of KSampler.SAMPLERS and only registers it as a function, reachable solely through this node. If you type a sampler name and can't find "cfgpp", that's why - this node is the interface.
Inputs, outputs, wiring
One input, one output, both SAMPLER:
SamplerTaylorFlow(…) → SamplerWrapperCFGPP(sampler=…) → KSampler(sampler=…, cfg=…)
Chain any of this pack's samplers (or any sampler node) into it. Pair it with a low-to-moderate CFG on the KSampler - the whole point is getting guidance without cranking the scale. On Chroma, where pushing CFG up past a modest ceiling just adds saturation and burn, this is the gentler path to prompt adherence, and the same trick that NoobAI v-prediction users swear by at CFG 1.5–2.0.
Installing
Standard pack install, no dependencies:
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/Clybius/ComfyUI-ClybsChromaNodes.git
# restart ComfyUI
Or ComfyUI Manager → search "ComfyUI-ClybsChromaNodes". It's part of the same pack by Clybius, the Chroma-GGUF maintainer.
Common issues
Because it recomputes the denoised every step, expect it to behave slightly differently from the inner sampler run bare - that's the point, but it means you're tuning a new combination, not your old settings with a bonus. A/B on a fixed seed and a fixed CFG before judging it. And if output looks unexpectedly flat, your CFG is probably too low now - the wrapper does the guidance work, so your scale does less than it used to.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| sampler | SAMPLER | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SAMPLER | SAMPLER | — |