ConditioningSubtract
Subtracting one prompt from another isn't a negative prompt
- cond_orig
- cond_subtract
- CONDITIONING
A negative prompt doesn't remove a concept from your positive prompt - it works during sampling, through classifier-free guidance, steering each denoise step away from a separately-encoded concept. ConditioningSubtract does something structurally different: it takes the difference of two text conditionings directly, in embedding space, before sampling ever starts. The README calls it out honestly - "can have interesting effects that are different from negative prompts" - not a better negative prompt, a different operation entirely.
If you know the word2vec-style "king − man + woman" trick, this is the same family of idea applied to a text encoder's conditioning space: literal vector subtraction on the embeddings, not guidance steering during generation.
The inputs
cond_orig(CONDITIONING) - your base prompt's conditioning.cond_subtract(CONDITIONING) - the conditioning you want to subtract out.subtract_strength(default 1) - how much ofcond_subtractgets removed.1is a full subtraction; lower values are partial; pushing well past1subtracts more aggressively and degrades coherence faster than you'd expect.
One output: CONDITIONING, which you wire into your sampler exactly like any other conditioning.
What to actually expect from it
Don't expect clean removal. Subtracting a "style" or "concept" conditioning from your base prompt doesn't cleanly erase that concept from the output the way a negative prompt discourages it during sampling - it shifts the embedding to a new point in the model's representation space, and where that point lands is not always predictable. Sometimes that's genuinely interesting (an emergent shift you couldn't get by writing a different prompt), sometimes it's just broken output. This is squarely a tinkering node, not a production workflow staple - treat it as something to experiment with rather than something you build a reliable pipeline around.
How to install it
ComfyUI Manager: search "ComfyUI-Image-Filters", install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/spacepxl/ComfyUI-Image-Filters
then restart. The pack's dependency is opencv-contrib-python, needed for its image-processing nodes; this particular node does no image work at all (it's pure conditioning-tensor arithmetic), but it ships in the same package, so the same install and the same opencv-conflict caveat apply if you're installing manually. A cv2 import error on startup blocking the whole pack from loading is typically another node pack's conflicting opencv variant - the author's install.bat/import_error_install.bat fix it on Windows, and manually uninstalling stray opencv packages and reinstalling opencv-contrib-python alone works elsewhere.
Common issues & troubleshooting
Output looks broken or incoherent, not just "different." subtract_strength above 1 pushes further than most text encoders tolerate gracefully - start at 1 or lower and work up, rather than assuming higher is stronger-in-a-good-way.
Expecting it to work like a negative prompt and it doesn't. That's the point, not a malfunction - this operates on the embedding before sampling, a negative prompt operates during sampling via guidance. They're different mechanisms with different failure modes; if you actually want standard negative-prompt behavior, use your sampler's negative conditioning input instead of this node.
Effect seems inconsistent between different prompt pairs. Because this is raw vector subtraction in an embedding space that wasn't designed for arithmetic, how well it "works" depends heavily on how the two conditionings relate to each other in that space - there's no general rule for which pairs subtract cleanly and which don't. Treat every combination as its own experiment.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| cond_orig | CONDITIONING | — | |
| cond_subtract | CONDITIONING | — | |
| subtract_strength | FLOAT | 1.00 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |