Nodes/ComfyUI_IPAdapter_plus/IPAdapter Combine Embeds
ComfyUI Node Runs on cloud

IPAdapter Combine Embeds

Merge up to five references into one

By cubiq·Created 3 years ago·Updated about a year ago· 6,088
IPAdapter Combine Embeds
  • embed1
  • embed2
  • embed3
  • embed4
  • embed5
  • EMBEDS
method

This is the blender. IPAdapter Combine Embeds takes several pre-encoded reference embeddings and merges them into a single one, so instead of conditioning on one image you condition on a considered mix of several. It's the middle step in the pack's embeds pipeline: encode images with IPAdapter Encoder, combine them here, apply the result with IPAdapter Embeds.

Why you'd want it: a single reference photo is a fragile thing to hang an identity or a style on - one bad angle, one weird lighting condition, and the model overfits to it. Feed it several encoded views and average them, and you get a more robust, more general reference that captures "this person" or "this style" rather than "this one photo." The stacking-multiple-references trick that experienced IP-Adapter users lean on runs through this node.

Inputs and outputs

You need at least one embedding, embed1, and a method. Then up to four more optional slots - embed2, embed3, embed4, embed5 - so five references max in one merge. The output is a single EMBEDS you carry into IPAdapter Embeds.

The method dropdown is the whole personality of the node, with seven options:

  • concat - keeps all the tokens from every embedding. The strongest, most information-preserving option, but heavier and it can crowd the conditioning. Good when you want every reference to genuinely count.
  • average / norm average - blend the embeddings into a smooth middle ground. This is the sensible default for "make one identity out of several photos of the same subject." Norm average normalizes as it blends.
  • add - sums them; influence stacks up rather than averaging out.
  • subtract - removes one embedding's direction from another. This is the clever one: encode "with glasses" and "without glasses," subtract, and you've isolated an attribute you can then push or pull.
  • max / min - take the element-wise maximum or minimum across embeddings. Niche, experimental, occasionally useful.

How to think about the methods

For the common case - several photos of one person or one style you want to fuse - reach for average. For "I want all of these to show up distinctly," try concat and accept the extra weight. subtract is your tool for attribute arithmetic when you're doing something more surgical than blending. Honestly, the differences are easiest to feel by generating with each on the same references; the math descriptions undersell how different the outputs look.

Note this node only works on embeddings, so everything upstream has to be encoded first. You can't feed it raw images. If your references are still images, run them through IPAdapter Encoder (one per image) before they reach this node.

Installing the pack

ComfyUI Manager: Custom Nodes Manager, search "IPAdapter plus", install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/cubiq/ComfyUI_IPAdapter_plus, then restart ComfyUI. The pack needs an IP-Adapter model in ComfyUI/models/ipadapter and a CLIP vision encoder in ComfyUI/models/clip_vision (used during the encoding step upstream of this node). Update ComfyUI if any node won't load. This is a pure vector-merge utility - no model download of its own - but it only makes sense inside the encode → combine → apply chain, so it lives and dies with the rest of the pack.

Categoryipadapter/embeds

Inputs (6)

NameTypeDefaultDescription
embed1EMBEDS
methodCOMBO7 options: concat, add, subtract, average, norm average, max, +1
embed2optEMBEDS
embed3optEMBEDS
embed4optEMBEDS
embed5optEMBEDS

Outputs (1)

NameTypeDescription
EMBEDSEMBEDS