Nodes/ComfyUI-NegativeFold/Fold Negative Into Positive (Conditioning)
ComfyUI Node

Fold Negative Into Positive (Conditioning)

Your Negative Prompt Isn't Dead — It Just Needs Folding

By Faildes·Created 9 months ago·Updated 8 months ago· 1
Fold Negative Into Positive (Conditioning)
  • positive
  • negative
  • CONDITIONING
scale5.0
rescale0.70
fold_pooledtrue

Every Turbo, Lightning, or Hyper-SD user hits this eventually: you load the fast checkpoint, keep your usual workflow, and the negative prompt does nothing. Blurry, bad anatomy, extra fingers - all of it sails through no matter how hard you beg. That's not you doing it wrong. It's the model.

Distilled models have guidance baked into their weights, so they're designed to run at CFG 0–1. At exactly CFG 1, ComfyUI doesn't even compute the unconditional pass that the negative prompt rides on - it skips that whole prediction for speed. No unconditional pass, no negative prompt. Zero effect, by design. Fold Negative Into Positive is a one-node workaround that folds your negative directly into the positive conditioning, so a model with no CFG to speak of still gets pushed away from what you don't want.

Why the box went dead

A negative prompt isn't a filter. Classifier-free guidance runs two predictions per step - one with your prompt, one "unconditional" - and the negative prompt just replaces that empty string so the sampler steers away from what you wrote. Guidance-distilled models trained that extrapolation into their weights instead, so they run a single forward pass at CFG 1 and the negative field has nothing to attach to. The standard advice is to restate your constraints positively ("clean studio background, sharp focus" beats "blurry, deformed" on these models) or install NAG for attention-space steering. This node is the third option: do the steering in embedding space, before the sampler ever sees it.

What the fold actually does

The math is small and worth understanding because it tells you how to dial it. The node computes:

x = positive + scale × (positive − negative)

Set scale to 1 and that's literally the CFG-2 extrapolation - 2·positive − negative - collapsed into a single vector. It's a linear approximation of what the sampler would have computed, done on the raw text embeddings instead of the model's noise predictions. That's the whole trick, and also the honest limit: it pushes the conditioning, not the denoiser.

Where people get burned is the default scale of 5, which is aggressive - closer to embedding-space CFG 6. That's why rescale exists. It normalizes the folded vector's standard deviation and norm back toward the positive's (clamped between 0.25× and 4×), then blends positive + 0.7 × (folded − positive). Net effect: 30% of your original positive survives and the result doesn't fly off into weird latent space. The optional fold_pooled (on by default) runs the same fold on the pooled text embedding that SDXL-lineage models feed their second conditioning slot, so keep it on unless your architecture doesn't use one.

It also quietly handles the plumbing for you: negative token sequences get padded or truncated to the positive's length, and a single negative is broadcast across multiple positives in a batch. It's genuinely drop-in.

The inputs that matter

  • scale - how hard to push away from the negative. 1 is the classic CFG direction; the default 5 is strong. If output starts overcooking, drop it to 1–3.
  • rescale - how much of the original positive survives the fold. Default 0.7. If the fold feels like it's fighting your prompt, nudge it toward 1.
  • fold_pooled - whether to fold the pooled text embedding too. Leave on for SDXL and friends.

Output: one CONDITIONING. Per the README, wire it into the sampler's positive input, keep CFG at the model's designed value (0–1), and your negative finally has a say.

Installing it

The README's whole install is: drop it in custom_nodes and restart.

cd ComfyUI/custom_nodes
git clone https://github.com/Faildes/ComfyUI-NegativeFold

Then restart ComfyUI and look under conditioning for "Fold Negative Into Positive (Conditioning)". ComfyUI Manager can also find it by searching "ComfyUI-NegativeFold" - it's published to the Comfy Registry via pyproject.toml. No requirements.txt, no model downloads, nothing. The entire pack is one ~200-line Python file that only touches torch, which ComfyUI already ships.

The honest part

Treat this as a nudge, not a magic CFG revival. Folding steers the conditioning vector, a linear approximation of what real guidance would have done - great for "avoid this thing," less useful for fine aesthetic control. And be honest about the pack's footprint: one small file, one author, essentially no community testing. If you need robust negative control on a distilled model, NAG or positively-restated constraints are the battle-tested routes. This is the zero-dependency middle ground - and a couple of hundred lines of math that teach you more about what conditioning actually is than most "essential" packs ever will.

Categoryconditioning

Inputs (5)

NameTypeDefaultDescription
positiveCONDITIONING
negativeCONDITIONING
scaleFLOAT5.0-20–20
rescaleFLOAT0.700–1
fold_pooledoptBOOLEANtrue

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING