Nodes/comfyui-spawner-nodes/Conditioning 池化合并
ComfyUI Node

Conditioning 池化合并

Collapse two conditionings to pooled vectors and merge them

By spawner1145·Created about a year ago·Updated 11 months ago· 2
Conditioning 池化合并
  • conditioning1
  • conditioning2
  • merged_conditioning
merge_strategymean

Where ConditioningConcatenation joins two conditionings by stacking their token sequences, ConditioningPooledMerge takes the opposite route: it squashes each conditioning down to a single pooled vector - one average over all its tokens - then merges those two vectors. Out the other end is a conditioning that's one token long, whose "pooled" value is the merged result.

That's a niche but real shape. This is the node you reach for when you want the gist of two prompts rather than their full token streams: a content vector and a style vector averaged together, or a coarse "what is this conditioning about" representation to feed into something that operates on pooled space (which is how SDXL's pooled vector path works). It's also where masks earn their keep.

The knobs:

  • conditioning1, conditioning2 - the two CONDITIONING inputs.
  • merge_strategy - the pick of the day, four options: concat (vectors side by side, doubles the width), add, mean, max. Default is mean, the "average the two gists" option. concat is the only one that changes the feature dimension, so if a downstream node expects a fixed width, concat will surprise you.

Mechanically it does the smart thing with masks: if either conditioning carries an attention_mask, pooling is masked - tokens marked 0 are excluded from the average instead of dragging it down. That's the same 1=keep/0=drop convention as the rest of the pack, and it means ragged or padded sequences get pooled honestly. If the two pooled vectors end up with different feature widths (mismatched encoders), the second is shoved through the pack's TensorShapeAdapter - again, a random projection, so treat any dimension-fix as "compatible but not meaningful." The output conditioning gets pooled_output set to the merged vector, a sequence length of 1, and whichever mask survived.

The same honesty applies here as everywhere in this pack: this is raw vector arithmetic on prompt embeddings, not a learned blend. mean literally averages the token representations - it's a blunt tool, useful when you want to experiment with pooled-space math, and not a replacement for ConditioningCombine's sequence-add if what you actually want is token-level combination.

Install

Standard pack install - ComfyUI Manager, search comfyui-spawner-nodes, install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/spawner1145/comfyui-spawner-nodes

The pack's deps are three pure-Python libs (piexif, pypng, xmltodict), no models. The README is a stub, the UI is Chinese-labeled, and the author is the same Chinese-speaking dev (known for a Wan2.1 SD extension) behind the rest of the pack. Document yourself accordingly.

Troubleshooting

  • Output width changed unexpectedly - you picked concat. Feature dim doubles; downstream nodes expecting the original width will throw.
  • concat + dim mismatch errors - combined with TensorShapeAdapter auto-fixing widths, the doubled dimension can cascade. Align feature dims before this node.
  • Merged conditioning "feels weaker" than either input - mean of two different prompts genuinely averages them into mush. Use add or max for a more assertive blend, or concat if you want both retained.
Categoryspawner/conditioning

Inputs (3)

NameTypeDefaultDescription
conditioning1CONDITIONING
conditioning2CONDITIONING
merge_strategyCOMBOmean4 options: concat, add, mean, max

Outputs (1)

NameTypeDescription
merged_conditioningCONDITIONING