Nodes/NegPiP Prompt (Multi-Model)/NegPiP Prompt (Multi-Model)
ComfyUI Node

NegPiP Prompt (Multi-Model)

NegPiP Prompt (Multi-Model)

By cyberdeliaAI·Created about a month ago·Updated 22 days ago· 5
NegPiP Prompt (Multi-Model)
  • model
  • clip
  • patched_model
  • positive
  • negative
  • compiled_prompt
positive
negative

Your Z-Image Turbo runs at CFG 1, because that's how it was distilled and anything higher burns the image. Which means your negative prompt box is dead weight: at CFG 1 ComfyUI skips the unconditional pass entirely, so nothing you type there ever reaches the model. This node is a way over that wall that isn't NAG. It folds your negatives into the positive conditioning with negative weights, so the model steers away from them without ever needing a second pass.

NegPiP Prompt (Multi-Model) from cyberdeliaAI/comfyui-negpip-zimage is a single node that does the whole trick for Z-Image, Z-Image Turbo, Krea 2, SD1, SDXL, and Anima. Drop it right after your model and CLIP loaders, give it a positive and a negative prompt, and it hands back a patched model plus conditioning. The pack name still says "zimage" and the node ID keeps the old ZImageNegPipPrompt, but 2.x is model-neutral - it's a descendant of pamparamm's ComfyUI-ppm, BigStationW's Z-Image adaptation, and the original sd-webui-negpip by laksjdjf and hako-mikan. Flux is deliberately unsupported; the upstream NegPiP path for it is unmaintained.

How it works

The node clones your model and CLIP, patches the text encoder so negative token weights are interpreted, and merges the two prompt strings. blurry background, (text:1.3) in the negative becomes (blurry background:-1), (text:-1.3) in the compiled positive. Those negative-weight tokens push attention away from the concept during generation. Because the steering happens inside the positive conditioning, it works with CFG held at 1.0 - keep Turbo at 1.0 and use normal CFG for SD1/SDXL. Bonus: since this node controls the encoder, (tag:1.3)-style weights actually apply, which plain Z-Image/Krea CLIP encoding silently discards.

The compiled_prompt STRING output is a gift for beginners: wire it into Preview Any (or any text display) and you can see exactly what got sent to the encoder. Put Asian in the negative and it must read (Asian:-1) - that's your proof the mechanism is live.

Inputs and outputs that matter

All four inputs are required:

  • model - your loaded diffusion model.
  • clip - the matching text encoder.
  • positive / negative - both are STRING sockets, so you can feed them from a multiline text node, wildcard node, or prompt generator instead of hardcoding.

Outputs: patched_model (MODEL - goes to the sampler or guider), positive and negative CONDITIONING (both connect straight to the sampler), and compiled_prompt (STRING - inspection only). One thing that trips people: the negative CONDITIONING output is deliberately empty. NegPiP does its work inside the positive conditioning, so don't expect that socket to carry anything.

Installation

ComfyUI Manager: search NegPiP Prompt (Multi-Model). Or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/cyberdeliaAI/comfyui-negpip-zimage

then restart. No extra pip packages, no model downloads - it patches whatever you already have loaded. Two gotchas, though. First, it's built on ComfyUI's newer extension API, so an up-to-date ComfyUI is a dependency, not a suggestion. Second, the Krea 2 path needs a ComfyUI with native Krea 2 support: load the encoder with CLIPLoader type krea2, not a Qwen, Z-Image, or Flux CLIP - they are not interchangeable.

Common issues

The #1 mistake is wiring: the sampler or guider must take patched_model from this node, not from the original model loader. Keep that input on the loader and you're running the unpatched model, wondering why nothing changed. Don't send compiled_prompt back through another CLIP Text Encode either - the stock tokenizer doesn't understand NegPiP weights.

Then there's strength. A huge negative list at 1.0 dominates the prompt and gives you weird results. Group related concepts and start gentle:

(3D, CGI, render, blender:0.25), (text, watermark, logo:0.7), (blurry, low quality, jpeg artifacts:0.4)

Each group gets a magnitude - (blurry:0.4) in the negative input compiles to (blurry:-0.4), so you tune exactly how hard the model pushes away. That's the whole control surface, and the only genuinely strange part of the syntax. If you also run ComfyUI-ppm, don't stack two NegPiP nodes on the same model/CLIP branch; this node detects an existing ppm patch and reuses it rather than doubling up. Worth the small learning curve: real negatives on Turbo, no CFG pass, no speed penalty at sampling time.

Categoryconditioning/NegPiP

Inputs (4)

NameTypeDefaultDescription
modelMODEL
clipCLIP
positiveSTRING
negativeSTRING

Outputs (4)

NameTypeDescription
patched_modelMODEL
positiveCONDITIONING
negativeCONDITIONING
compiled_promptSTRING