Nodes/ComfyCollectorNodes/Conditioning Lerp (CCN)
ComfyUI Node

Conditioning Lerp (CCN)

Crossfade between two prompts in embedding space

By valkymaera·Created 4 months ago·Updated 10 days ago· 1
Conditioning Lerp (CCN)
  • conditioning_a
  • conditioning_b
  • conditioning
blend0.50
reuse_first_b_entrytrue
debugfalse

Prompt blending is usually done by concatenating text - "a cat AND a dog" - which is crude: the tokens fight, and the model has to sort out who owns what. Conditioning Lerp (CCN) does it the cleaner way: take two already-encoded conditionings and interpolate their embedding vectors. blend = 0 is 100% prompt A, blend = 1 is 100% prompt B, 0.5 is a genuine 50/50 mix in embedding space - which lands somewhere between the two meanings rather than pasting them side by side.

How it works

The math is a straight lerp: result = a * (1 - blend) + b * blend. The pooled outputs (the summary vectors some encoders carry) are interpolated too when both sides have them. Two details in the source are worth knowing because they're the difference between "works" and "crashes":

  • Sequence lengths can differ. A Krea2/Qwen3-VL conditioning with vision tokens can be a different length than a plain text encode. The node never truncates A: blending happens over the overlapping token region, and A's tail passes through pure. That's the correct default - you don't want the mix destroying A's structure just because B is shorter.
  • Identity at the endpoints. If blend is exactly 0 or 1, it returns A or B unmodified - no rebuilds, no structural fiddling.

reuse_first_b_entry only matters in the rare case where A has more conditioning entries than B: on means B's first entry is blended into the extras, off means the extras pass through untouched. Leave it on unless you know why you're turning it off.

Inputs and outputs

conditioning_a, conditioning_b, and blend (0–1, step 0.01) are the whole story, plus debug for console diagnostics. Output is a single conditioning - wire it straight into your sampler's positive (or negative) input in place of one encode.

Install

ComfyUI Manager → search ComfyCollectorNodes → Install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/valkymaera/ComfyCollectorNodes

Restart, no pip step. All nodes appear with the (CCN) suffix.

Where it earns its keep

Blending embeddings is the tool for controlled mixing - style transfer, subject + environment crossfades, easing between a strong and a weak prompt for interpolation runs. The obvious gotcha: the blend only makes semantic sense if both encodings came from the same CLIP/encoder. Cross-encoder mixes are handled defensively (pooled shape mismatches fall back to A's pooled rather than erroring), but the result is less meaningful. And a lerp in embedding space is not a guarantee the image interpolates smoothly - it's a direction, not a destination. Start at 0.5 and animate the blend if you're doing a morph-style run; this is a nicer primitive for that than any text concatenation trick.

CategoryComfyCollectorNodes/Conditioning

Inputs (5)

NameTypeDefaultDescription
conditioning_aCONDITIONING
conditioning_bCONDITIONING
blendFLOAT0.500–1
reuse_first_b_entryoptBOOLEANtrueOnly matters when conditioning_a contains MORE entries than conditioning_b (rare; most conditionings are a single entry). ON = blend B's first entry into the extra A entries. OFF = pass the extra A entries through completely unchanged.
debugoptBOOLEANfalse

Outputs (1)

NameTypeDescription
conditioningCONDITIONING