Nodes/Sage Utils/Average Conditioning
ComfyUI Node

Average Conditioning

Blend prompts' embeddings, not their text

By arcum42·Created 2 years ago·Updated 24 days ago· 32
Average Conditioning
  • conditionings
  • conditioning

There are two very different ways to "combine" two prompts. One is concatenation - glue the text together into one string and encode it as a single run - which changes token count and position and can make CLIP treat the combined phrase differently from either piece on its own. The other is what this node does: encode each idea separately elsewhere in your graph, then average the resulting conditioning tensors together directly. That keeps each idea's embedding intact and just blends them numerically, which tends to feel more like "50% of this, 50% of that" than concatenation does.

It's a genuinely simple node with a genuinely useful niche: blending two character descriptions toward a midpoint, mixing a style conditioning with a subject conditioning without paying the token-budget cost of jamming both strings together, or averaging several variations of the same idea to smooth out quirks any single phrasing introduced.

Inputs and outputs

Just one input, conditionings - an expandable list, add as many existing CONDITIONING outputs as you want to average together. These need to already be encoded conditionings (from a text encode node, another combine node, wherever), not raw text - this node doesn't touch CLIP at all, it operates purely on tensors you've already produced.

Output is a single conditioning - the mathematical average of everything you fed in, ready to wire into a sampler like any other conditioning.

Installing it

ComfyUI Manager: search Sage Utils, install, restart. Manual install:

cd ComfyUI/custom_nodes
git clone https://github.com/arcum42/ComfyUI_SageUtils
cd ComfyUI_SageUtils
pip install -r requirements.txt

Restart ComfyUI. Nothing to download for this one - it's pure tensor math on conditionings you've already got.

Common issues

Averaging conditionings from wildly different CLIP models or architectures isn't something to expect good results from - the tensors need compatible shapes, and even when they technically are, averaging embeddings from two unrelated encoders tends to produce muddy, unpredictable output rather than a clean blend. Stick to conditionings that came from the same CLIP model.

Also worth knowing: if you only feed in one conditioning, you'll just get that same conditioning back - averaging a single value with nothing else is a no-op, not an error, so don't be surprised if the node "does nothing" when you've only wired up one input. And compared to Sage_CombineConditioning, which lets you pick the blending operation explicitly, this node has one fixed behavior - average, full stop - so if you need a different kind of combination (straight summation, say), that's the node to reach for instead.

CategorySage Utils/clip/conditioning

Inputs (1)

NameTypeDefaultDescription
conditioningsCOMFY_AUTOGROW_V3Input value for conditionings.

Outputs (1)

NameTypeDescription
conditioningCONDITIONING