IPAdapter Encoder V2
Turn reference images into reusable embeddings
- ipadapter
- image
- mask
- clip_vision
- pos_embed
- neg_embed
IPAdapter Encoder V2 is the front half of the pack's pre-encoding workflow: it takes reference images and runs them through CLIP vision to produce embeddings, which you then feed into IPAdapter Embeds V2 (or save with IPAdapter Save Embeds V2 and reload with IPAdapter Load Embeds V2). On its own it does nothing visual - no model patching, no sampling - but it's the node that makes "encode once, generate a hundred times" possible.
How it works
You feed it an ipadapter (for the CLIP vision model it carries, unless you override with the clip_vision input) and an image. It detects whether you're on Plus or base weights by inspecting the adapter, then encodes with the right CLIP vision resolution (224×224 for SD1.5/SDXL, 336×336 for Kolors). A weight input (default 1.0, up to 3) scales the positive embedding directly - handy for pre-applying strength at encode time. The optional mask restricts encoding to part of the reference, which is the "use just the face region" trick when you don't want a full-image conditioning.
Two outputs: pos_embed - the positive embedding, essentially "make it look like this" - and neg_embed, the negative one, which is the empty/zero embedding (or masked counterpart) that stands for "make it not look like this" when you feed it to the apply node's neg_embed input.
What it unlocks
The whole point is decoupling encode time from generate time. Reusing one reference across many runs means CLIP vision runs once, not every generation, and saved embeddings are deterministic - no crop drift, no re-encoding variance. If you're building a character sheet, a style reference, or a batch animation that reuses references, encode once and reuse.
One caveat on the negative: the Encoder's neg_embed is produced by encoding a black (zero) image for Plus-style adapters - it's the "nothing here" conditioning, not a "do the opposite" embedding. For real exclusion you'd combine embeddings (subtract in IPAdapter Combine Embeds V2) rather than relying on neg_embed alone.
Installing it
ComfyUI Manager: search "ComfyUI_IPAdapter_plus_V2". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_IPAdapter_plus_V2
Restart ComfyUI. You need the CLIP vision model in ComfyUI/models/clip_vision and the adapter in ComfyUI/models/ipadapter.
Gotchas
Embeddings are only meaningful to the apply nodes if the CLIP vision model matches on both sides - encode with one vision model, apply with another, and the conditioning drifts. And the embeddings you get are adapter-specific in spirit: encode with Plus weights in the pipeline and apply to a Plus-weights setup; mixing base and Plus adapters across the encode/apply boundary produces embeddings of different shapes. This pack is a renamed snapshot of cubiq's V2 codebase, so don't expect it to track upstream fixes.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| ipadapter | IPADAPTER | — | |
| image | IMAGE | — | |
| weight | FLOAT | 1.00-1–3 | — |
| maskopt | MASK | — | |
| clip_visionopt | CLIP_VISION | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| pos_embed | EMBEDS | — |
| neg_embed | EMBEDS | — |