AI4ArtsEd Conditioning Fusion
Walking the semantic space between two prompts
- conditioning_a
- conditioning_b
- CONDITIONING
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 throughstepsintermediate 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 bymulti_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.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning_a | CONDITIONING | — | |
| conditioning_b | CONDITIONING | — | |
| alpha | FLOAT | 0.50-5–5 | — |
| interpolation_method | COMBO | linear | 4 options: linear, spherical, multi_step, latent_aware |
| steps | INT | 32–10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |