Nodes/AI4ArtsEd Nodes/AI4ArtsEd Conditioning Fusion
ComfyUI Node

AI4ArtsEd Conditioning Fusion

Walking the semantic space between two prompts

By joeriben·Created about a year ago·Updated 7 months ago· 1
AI4ArtsEd Conditioning Fusion
  • conditioning_a
  • conditioning_b
  • CONDITIONING
alpha0.50
interpolation_methodlinear
steps3

AI4ArtsEd Conditioning Fusion blends two CONDITIONING tensors into one, with alpha as the mixer knob. Set it to 0.5 and you get the midpoint between prompt A and prompt B in embedding space - an image that's neither fully one nor the other. It's the classic "interpolate between two concepts" idea that people have been doing with latents and embeddings since the SD 1.5 days, packaged as a drop-in node you can wire between your CLIP/T5 encoders and the sampler.

Where it differs from the naive approach is the interpolation_method dropdown, which gives you four ways to walk that space:

  • linear - plain LERP: (1-α)·A + α·B. Fast, fine for most blending.
  • spherical - SLERP along the arc between the two vectors, which keeps the blend from collapsing through the origin. Usually behaves more gracefully when A and B are far apart.
  • multi_step - progressive blending through steps intermediate points, then interpolating to your exact alpha. A fancier path for exploring the middle.
  • latent_aware - interpolates direction (via SLERP) and magnitude separately, then recombines. The intent is better semantic preservation; the code comment calls it magnitude-normalized.

The node interpolates the first N tokens (N = the shorter prompt's token count), appends any leftover tokens from the longer side, and blends the pooled outputs the same way. So it handles mismatched-length prompts without choking.

The inputs that matter

  • conditioning_a, conditioning_b - two CONDITIONING inputs (e.g. two separately encoded prompts).
  • alpha - the blend, default 0.5, range -5 to 5. Negative alpha extrapolates past A; values above 1 extrapolate past B. At 0 you get pure A, at 1 pure B.
  • interpolation_method - the four options above.
  • steps - only used by multi_step (2–10).

Output: a single CONDITIONING, ready for a KSampler.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/joeriben/ai4artsed_comfyui_nodes
# restart ComfyUI

Or search "AI4ArtsEd" in ComfyUI Manager. Pure torch - no extra dependencies, no models, no key.

Common issues

Embedding dimension mismatch. The two conditionings must share the same embedding dimension (both 768-D, both 1024-D, etc.). Mixing, say, a CLIP-L-encoded prompt with a T5-encoded one will error - the node validates and refuses. It will happily blend different-length prompts, but not different-dimensionality ones.

Batch size mismatch. If you feed it conditionings with different batch sizes, it errors too. Keep batch=1 on both sides for straightforward use.

It fails silent. If anything throws, the node catches the exception, prints an error to the console, and returns conditioning_a unchanged. Your workflow won't crash, but you'll be sampling pure A and might not notice - check the terminal if the blend "isn't working."

Extrapolation gets weird fast. Negative alpha and alpha > 1 are the fun zone, but embeddings aren't infinitely extrapolatable - past ±2 you'll quickly hit incoherence. If results turn to noise, that's the embedding falling apart, not a bug.

For its niche - exploring the space between two prompts for education, art, or prompt studies - this is a solid, self-contained tool. It's the one "pure math" node in the pack, no LLM or network involved, and it does what it says with a bit more sophistication than a bare LERP.

CategoryAI4ArtsEd

Inputs (5)

NameTypeDefaultDescription
conditioning_aCONDITIONING
conditioning_bCONDITIONING
alphaFLOAT0.50-5–5
interpolation_methodCOMBOlinear4 options: linear, spherical, multi_step, latent_aware
stepsINT32–10

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING