Nodes/CFG Megapack/Signed guidance: positive and negative from the null (A1111 AND; VL-DNP, Chang et al. 2025)
ComfyUI Node

Signed guidance: positive and negative from the null (A1111 AND; VL-DNP, Chang et al. 2025)

Give your negative prompt its own axis instead of hijacking CFG

By AbstractEyes·Created 5 days ago·Updated 5 days ago· 3
Signed guidance: positive and negative from the null (A1111 AND; VL-DNP, Chang et al. 2025)
  • model
  • positive
  • negative
  • null
  • GUIDER
◄cfg7.0►
◄w_neg5.0►
◄spaceauto (the method's own)►

Standard negative prompting has a structural flaw nobody mentions in tutorial posts. The negative text isn't subtracted as its own thing - it replaces the empty prompt in CFG's unconditional pass. So if a word appears in both your positive and your negative, you're simultaneously asking for it and pushing away from it, and the push usually wins because it's weighted by cfg.

Signed guidance gives the negative its own signed term instead:

u + w (c - u) - w_neg (n - u)

Both your prompts are measured from the empty prompt u. The positive gets CFG's scale, the negative gets its own weight, and they stop competing for the same slot. It's the rule behind AUTOMATIC1111's "AND" syntax with negative weights, and it also appears as VL-DNP in Chang, Kim & Choi (arXiv 2025).

Inputs and output

This is a guider - it goes into SamplerCustomAdvanced, not a KSampler.

  • model, positive, negative, null. Three conditioning inputs, and the third one is the point: null is "The empty prompt: the true unconditional", an empty CLIPTextEncode. You must wire it. Feeding the negative into null collapses you back to classic CFG with extra steps.
  • cfg - default 7, this node's own positive guidance scale.
  • w_neg - default 5. "Weight of the negative direction (w_neg = w is composable NOT)". That parenthetical is the useful landmark: w_neg equal to cfg gives you composable negation, the classic u + w(c - n) shape; w_neg at 0 gives exactly plain CFG.
  • space - auto (the method's own).

Output is a GUIDER, and any other CFG Megapack stages installed on the model still apply on top.

Why use it rather than a normal negative

Three reasons, in order of how often they matter.

  1. Words that must appear in the prompt anyway. "no cars" on a street scene: with CFG-as-unconditional, mentioning cars anywhere in the negative damages the cars you wanted. Signed, the term is a separate push and you can tune w_neg down until the good cars survive.
  2. A negative that's really a second instruction. "clean skin, natural texture" as a negative is a direction, not an absence. Signed guidance treats it like one.
  3. Separating strength from adherence. With a single cfg, raising adherence means raising the negative's authority too. Here they're two numbers.

The honest caveat: the default w_neg of 5 is strong. If you're used to negatives doing very little on SDXL at cfg 7, signed guidance at 5 will feel like a different beast - start at 2–3, then move up.

Cost, and the wiring trap

It runs three model evaluations per step rather than two, so expect roughly 1.5× the sampling time of plain CFG. It also only works inside SamplerCustomAdvanced: KSampler has no guider input, and if you leave this node hanging off the side of a KSampler workflow it contributes precisely nothing.

Install

Manager → search CFG Megapack → install → restart ComfyUI. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/AbstractEyes/comfy-cfg-megapack

Nothing to pip install, no model files, no key. The pack needs a current ComfyUI (comfy_api.latest; README reports 0.38.0), which is worth checking before you file a bug about the nodes not appearing.

Fastest way to prove the wiring: set w_neg to 0 and cfg to 7. That reproduces plain CFG exactly, so if it doesn't, something upstream is wrong - usually null holding actual text.

Where people get burned

Higher w_neg is not "more of the effect". Past about 8 on SDXL you get the classic negative-prompt casualties: desaturated skin, lost detail, the smoothed-out look. The whole appeal here is that you can dial it back independently of adherence - use that.

It's inert at CFG 1. At cfg 1 the guidance term collapses and ComfyUI skips the unconditional pass entirely, so on guidance-distilled models (Z-Image Turbo, Klein distilled, ERNIE Turbo) there's nothing for this or any negative to attach to. Those models want positive phrasing, or an attention-level negative method.

Two guider nodes in the graph. Only the one wired into SamplerCustomAdvanced runs; the other is decoration. Same for the pack's other five negative-prompt guiders - one at a time.

A huge negative still hurts. Signed guidance fixes how the negative is applied, not what you wrote. The forty-keyword boilerplate that SD 1.5 handed down still mostly doesn't survive a fixed-seed A/B test. Name the one defect you can see.

CategoryCFG Megapack/papers/negative prompts

Inputs (7)

NameTypeDefaultDescription
modelMODEL—
positiveCONDITIONING—
negativeCONDITIONING—
nullCONDITIONINGThe empty prompt: the true unconditional.
cfgFLOAT7.00–100—
w_negFLOAT5.00–30Weight of the negative direction (w_neg = w is composable NOT).
spaceCOMBOauto (the method's own)Where the rule is computed. Linear rules give the same image in any space; nonlinear ones do not. 'auto' uses the space the method was published in (noise for most, denoised for APG and the angle rule, velocity for flow models).

Outputs (1)

NameTypeDescription
GUIDERGUIDER—