Nodes/ComfyCollectorNodes/Neutral Prompt Guider (CCN)
ComfyUI Node

Neutral Prompt Guider (CCN)

A CFG guider that merges perpendicular, salient, and top-k prompts mid-sampling

By valkymaera·Created 4 months ago·Updated 10 days ago· 1
Neutral Prompt Guider (CCN)
  • model
  • positive
  • negative
  • sigmas
  • curve
  • np_entries
  • guider
  • sigmas
min_cfg1.000
max_cfg7.000
mode
sigma_decayfalse
cfg_rescale0.00
debugfalse
curve_data[{"x":0,"y":1,"in":0,"out":-1,"mirrored":true},{"x":1,"y":0,"in":-1,"out":0,"mirrored":true}]

This is the payoff node for the Neutral Prompt Entry. Where the Entry packages an aux conditioning with a strategy, the Guider is the engine that actually applies those strategies during sampling - and on top of that it's a curve-scheduled CFG guider, so you get two families of control in one node.

Here's the setup that makes it click: it's a GUIDER, which means it's built for SamplerCustomAdvanced, not the plain KSampler. Wire a model, positive and negative conditioning, and sigmas in, and you get guider + sigmas out. It's a drop-in superset of the pack's CurveCFGGuider - if you don't connect any np_entries, it behaves identically to that node, so you can adopt it gradually.

How it works

CFG is scheduled across the sampling run by a curve. The default curve_data starts at the top and eases to the bottom - effectively high guidance early, low guidance late - and min_cfg/max_cfg map the curve's 0 and 1 to actual CFG values (so min_cfg == max_cfg gives you flat, fixed CFG). mode chooses whether progress is measured by step or by sigma. sigma_decay attenuates guidance toward 1.0 as noise drops, which is a common trick to avoid over-saturation in late steps.

Then, when NP entries are present, the guider batches the negative, positive, and every aux conditioning into a single calc_cond_batch call and applies the perpendicular / salient / top-k transforms to the aux deltas before combining. That batching detail matters more than it sounds: it means ControlNet, IP-Adapter, area conditioning, timestep ranges and hooks all keep working through the standard pipeline, instead of the old-style approach where a custom sampler_cfg_function quietly broke half of them.

cfg_rescale (0–1, default 0 = off) is std-dev based CFG rescaling - the fix for over-exposure when you push CFG high. debug prints per-step diagnostics to the console so you can watch what each strategy is doing.

Inputs and outputs worth knowing

  • model / positive / negative / sigmas - the plumbing; sigmas come from a scheduler.
  • min_cfg / max_cfg - the CFG band the curve sweeps through.
  • curve_data (or the optional curve CCN_CURVE input, if you have a curve node handy) - the shape of the schedule.
  • np_entries - the accumulated chain from Neutral Prompt Entry nodes.
  • Outputs: guider (into SamplerCustomAdvanced) and sigmas (also into the sampler).

Install

Part of ComfyCollectorNodes - one install covers everything:

cd ComfyUI/custom_nodes
git clone https://github.com/valkymaera/ComfyCollectorNodes

then restart. ComfyUI Manager can do it too if you search "ComfyCollectorNodes". No models to download, no extra deps.

Where people get burned

The #1 trap is reaching for a regular KSampler. The guider output goes into SamplerCustomAdvanced (or any custom sampler that accepts a guider input) - plug it into a KSampler and it just won't connect. The other one is silent no-ops: if your Entry chain isn't actually wired into np_entries, the node happily runs as a plain curve guider and your aux prompts vanish without an error. And if you're on a guidance-distilled model, remember the whole point is that you can now feed it a real negative/aux conditioning when the stock CFG 1 path would ignore it - but results are model-dependent, so treat weights as something to sweep, not set once.

CategoryCCN

Inputs (13)

NameTypeDefaultDescription
modelMODEL
positiveCONDITIONING
negativeCONDITIONING
sigmasSIGMAS
min_cfgFLOAT1.000CFG value when the curve outputs 0.
max_cfgFLOAT7.000CFG value when the curve outputs 1.
modeCOMBOHow denoising progress is measured for the curve.
sigma_decayBOOLEANfalseAttenuate guidance toward 1.0 as sigma decreases.
cfg_rescaleFLOAT0.000–1Std-dev based CFG rescaling (0 = disabled). Reduces over-exposure at high CFG.
debugBOOLEANfalsePrint per-step strategy diagnostics to the console.
curve_dataSTRING[{"x":0,"y":1,"in":0,"out":-1,"mirrored":true},{"x":1,"y":0,"in":-1,"out":0,"mirrored":true}]
curveoptCCN_CURVE
np_entriesoptNP_ENTRIESNeutral prompt entries from NeutralPromptEntry nodes.

Outputs (2)

NameTypeDescription
guiderGUIDER
sigmasSIGMAS