Conditioning Subtract (CCN)
Subtract 'snow' from the scene to remove a concept
- conditioning_a
- conditioning_b
- conditioning
If a lerp is conditioning subtraction's sibling, this is the one that removes ideas. The pitch in the source is the cleanest framing: full_scene - "snow" = scene without snow. Conditioning Subtract (CCN) takes a base conditioning and subtracts another one from it, scaled by strength - so you can carve a concept out of a prompt in embedding space instead of fighting it in text. It's a lightweight cousin of a negative prompt, and on models without native negatives it's one of the few honest ways to say "less of this, not more of its opposite."
How it works
The math is result = conditioning_a - conditioning_b * strength, applied per token. Like the pack's lerp, it handles mismatched sequence lengths safely: A is never truncated, subtraction happens only over the overlapping region, and A's tail (vision tokens, template tokens) passes through untouched. The pooled outputs are subtracted too when both sides carry them, with shape mismatches handled defensively. And at strength = 0 it returns A completely unmodified - no rebuild, no truncation, which the source notes was a real bug fixed at some point.
reuse_first_b_entry is the same rarely-relevant knob as in Conditioning Lerp: only matters when A has more entries than B, and on just means B's first entry is used for the extras.
Inputs and outputs
conditioning_a is the base scene, conditioning_b is the concept to remove, strength (0–5, default 1) is how hard you remove it. Out comes one conditioning, inline-safe between encoder and sampler.
Install
ComfyUI Manager → search ComfyCollectorNodes → Install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/valkymaera/ComfyCollectorNodes
Restart, no pip step. Under the (CCN) suffix.
Where it works and where it doesn't
Embedding subtraction is genuinely useful for specific concept removal - "snow," "glasses," a particular style element - where the concept occupies a consistent vector direction. It's cheap and it composes (subtract two things by chaining two nodes). But don't expect it to behave like a negative prompt: a negative prompt steers via the CFG difference every step and can express "push toward/away" semantics; this is one static subtraction done before sampling, so it's blunter and model-dependent. For flow models where negatives are inert, this (and the pack's Projection Removal) is the practical substitute, and subtracting at moderate strength (~0.5–1) is a solid first attempt at "get the snow out" on a Flux or SD3 workflow. Over-subtracting distorts the scene, so back off if unrelated content starts changing.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning_a | CONDITIONING | — | |
| conditioning_b | CONDITIONING | — | |
| strength | FLOAT | 1.000–5 | — |
| reuse_first_b_entryopt | BOOLEAN | true | Only matters when conditioning_a contains MORE entries than conditioning_b (rare; most conditionings are a single entry). ON = subtract B's first entry from the extra A entries. OFF = pass the extra A entries through completely unchanged (nothing subtracted). |
| debugopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |