IPAdapter Combine Embeds(IPAdapterCombineEmbeds)
IPAdapter Combine Embeds node from ComfyUI-IPAdapter-plus.
IP Adapter Combine Embeds
Description
IPAdapter Combine Embeds takes up to five IPAdapter embedding tensors and merges them into a single EMBEDS output using one of several combination methods. It is useful when you want to blend the conditioning produced by multiple reference images, prompts, or other IPAdapter embed sources before feeding the result into further IPAdapter nodes.
Only embed1 is required. The remaining inputs (embed2 through embed5) are optional, so the node can combine anywhere from one to five embedding sets. The selected method controls how the supplied embeds are merged.
Inputs
Required
- embed1 (
EMBEDS): The first, mandatory embedding input. Every combination method operates starting from this tensor. - method (
COMBO): The operation used to merge the supplied embeds. Available options:concat: Concatenates the embeds along their sequence dimension, stacking them into a longer embedding. This is generally the safest choice when the inputs have differing shapes.add: Adds the embeds element-wise.subtract: Subtracts the later embeds fromembed1element-wise.average: Averages the embeds element-wise.norm average: Averages the embeds after normalization, so inputs with different magnitudes contribute more evenly.max: Takes the element-wise maximum across the embeds.min: Takes the element-wise minimum across the embeds.
Optional
- embed2 (
EMBEDS): An additional embedding to include in the combination. - embed3 (
EMBEDS): An additional embedding to include in the combination. - embed4 (
EMBEDS): An additional embedding to include in the combination. - embed5 (
EMBEDS): An additional embedding to include in the combination.
Any optional input left unconnected is simply not part of the merge, so the node behaves correctly with as few as one embed connected.
Outputs
- EMBEDS: The combined embedding tensor, ready to be passed to other IPAdapter nodes that accept an
EMBEDSinput.
Usage Notes
- For
concat, the inputs do not need matching shapes, since they are joined along the sequence dimension. This makes it a reliable default when combining embeds from different sources. - The arithmetic methods (
add,subtract,average,norm average,max,min) combine values element-wise, so the connected embeds should have compatible shapes for meaningful results. - Supplying only
embed1withconcateffectively passes the embedding through unchanged, which can be handy as a placeholder in a graph. - Because optional inputs are ignored when unconnected, you can reuse the same node layout while varying how many reference embeds are active.
Comments
Sign in with GitHub to join the discussion.