Scheduled PerpNeg CFGGuider (Inspire)
Stronger negatives plus a CFG that ramps down
- model
- positive
- negative
- empty_conditioning
- sigmas
- GUIDER
- SIGMAS
This node combines two tricks that both aim at the same thing - cleaner results from your negative prompt - and it plugs into ComfyUI's custom sampling flow as a GUIDER. If you've never touched 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.
The two tricks: Perp-Neg makes your negative prompt actually pull in a useful direction, and CFG scheduling ramps guidance strength down over the course of sampling instead of holding it flat. Neither is a mainstream everyday setting - Perp-Neg is a niche optimization that shows up in maybe a couple dozen community threads total - but when you're fighting the specific problems they solve, they're the right tool.
What Perp-Neg actually does
Normal CFG pushes away from the negative prompt in a straight line. The catch is that the negative often points partly in the same direction as your positive, so cranking it fights your own positive prompt and you get burnt, oversaturated, or mangled output. Perp-Neg removes the component of the negative that's parallel to the positive, keeping only the perpendicular part - the bit that's genuinely "not this" rather than "less of what you asked for." The upshot is you can push negatives harder without the usual high-CFG damage. One place people use it: to get negative prompts working at very low CFG on models (like distilled/Flux-style ones) where a normal negative barely functions.
The scheduling half comes from the same family as Inspire's Scheduled CFGGuider - it slides CFG from a starting value to an ending value using linear, log, exp, or cos curves. High CFG early nails prompt adherence and composition; lower CFG late lets the model add natural detail instead of over-baking it.
The inputs and outputs that matter
positive,negative, andempty_conditioning- Perp-Neg needs all three. The empty (unconditioned) conditioning is the reference it uses to work out which part of the negative is "parallel" and should be dropped. Wire an empty CLIP text encode intoempty_conditioning.from_cfg(default 6.5) andto_cfg(default 1) - the CFG at the start and end of sampling. The defaults ramp from a normal-ish 6.5 down to 1, which is the whole point of scheduling.schedule(defaultlog) - the curve between them:linear,log,exp, orcos.logdrops fast then eases;expholds high then drops late. Worth experimenting with.neg_scale(default 1) - how strongly the perpendicular negative is applied. Higher = more negative influence.sigmas- the noise schedule from your scheduler node; it passes through so the guider is aligned to the same sampling steps.
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
It errors without an empty_conditioning. Perp-Neg mathematically needs the unconditioned reference - this isn't optional. Make an empty CLIP Text Encode (blank prompt) and connect it. Skipping it is the most common setup mistake.
Results look washed out or under-guided. Your to_cfg of 1 means guidance is nearly off by the end. If the image drifts from the prompt late, raise to_cfg, or pick a schedule (exp) that holds high CFG longer before dropping.
You need a custom-sampling graph, not a KSampler. This outputs a GUIDER, which only SamplerCustomAdvanced consumes. If you're wired to a plain KSampler, there's nowhere to plug it in - build out the noise / sampler / sigmas / guider chain.
Barely any difference from a normal CFG guider. Perp-Neg's effect is most visible when your negative is strong and would normally over-cook the image, or at low CFG where standard negatives go weak. On a gentle negative at moderate CFG the difference is small - that's expected, not broken.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| empty_conditioning | CONDITIONING | — | |
| neg_scale | FLOAT | 1.000–100 | — |
| sigmas | SIGMAS | — | |
| from_cfg | FLOAT | 6.50–100 | — |
| to_cfg | FLOAT | 1.00–100 | — |
| schedule | COMBO | log | 4 options: linear, log, exp, cos |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| GUIDER | GUIDER | — |
| SIGMAS | SIGMAS | — |