Nodes/ComfyUI_JinaCLIP_SDXL_IP_Adapter/Apply Jina IP-Adapter (Multi)
ComfyUI Node

Apply Jina IP-Adapter (Multi)

Same adapter, up to four references — and you get to choose between blending them or stacking them

By lRemixl·Created 5 months ago·Updated 4 months ago· 0
Apply Jina IP-Adapter (Multi)
  • model
  • jina_ip_adapter
  • jina_vision_model
  • image_1
  • image_2
  • image_3
  • image_4
  • MODEL
weight1.00
combine_methodconcat

Sometimes one reference isn't enough. You want a character's face from one image and their outfit's palette from another, or you want to average three anime screenshots into a single coherent style. That's the entire reason this node exists: it's JinaIPAdapterApply with image_1 through image_4 sockets instead of one, plus a combine_method dial that decides how the references fuse. Same pack, same loaders, same adapter - just multi-input.

How it works

Each image runs through the same pipeline - Jina vision tower, 16-token projector - independently. Then the embeddings get combined before they're written into the cross-attention patches across the eleven SDXL attention blocks. concat (the default) concatenates along the sequence dimension, so two references become 32 tokens, three become 48. average instead blends every reference into a single set of 16 tokens. The code also aligns mismatched batch sizes by repeating and padding smaller batches up to the largest, which matters if any of your reference images carry a batch of more than one.

Which to pick: concat tells the model "all of these things are present" - the strongest influence, but more tokens to attend to means more VRAM and compute, and results can get mushy as you pile on references. average produces a smoother compromise, the middle of your references' style, at no extra attention cost. Rule of thumb: concat for additive details, average for fusing a mood. If you only have one image, use the plain Apply node - this one works with 2–4 empty, but you'd be carrying multi-reference machinery for nothing.

Inputs

  • image_1 (required) plus image_2, image_3, image_4 (all optional) - wire up separate Load Image nodes; any socket left empty is skipped.
  • weight - same semantics as the single-image Apply. Default 1.0 is hotter than the author recommends; 0.6–0.9 is the style-transfer range. It multiplies the combined embedding, so with concat start lower than you would for a single reference.
  • combine_method - concat or average.

Output: MODEL - the patched clone, into a KSampler. Everything else matches the single-image variant: it clones your model, zeroes the image contribution on the unconditional pass so negatives stay clean, and does all the heavy lifting at apply time.

Install and models

Shared with the whole pack:

cd ComfyUI/custom_nodes
git clone https://github.com/lRemixl/ComfyUI_JinaCLIP_SDXL_IP_Adapter

then restart, or ComfyUI Manager → search "ComfyUI_JinaCLIP_SDXL_IP_Adapter". If the import fails it's almost always transformers missing: pip install transformers. Models: jina-clip-v2 (~3.5GB) → ComfyUI/models/LLM/jina-clip-v2/, and Mugen-Jina-IP-Adapter.safetensors (790MB) → ComfyUI/models/ip_adapter/. The adapter's HuggingFace repo includes a ready-to-use workflow file, which is worth grabbing either way.

Troubleshooting

  • Nothing visibly changes - weight near zero, or concat references fighting each other. Drop to a single image to isolate which one it is.
  • OOM with two or more references - expected. You're now running the 1.7GB vision tower and a 368M-parameter adapter plus extra attention tokens. Set the vision loader's dtype to fp16, or park it on cpu / a second card via its device input.
  • One reference looks great, four looks like a mess - that's normal for concat; the model has a lot of tokens to reconcile. Switch to average and lower the weight.
  • Realism looks off - the adapter was trained on danbooru2024 anime data for Mugen. It's a style tool, not a photorealism tool; the KB's standing advice on SDXL IP-adapters applies.

One last thing, same as everywhere in this stack: the adapter weights are Apache 2.0, but jina-clip-v2 - the vision model every one of these nodes depends on - is CC BY-NC 4.0. Non-commercial. Fine for hobby and experimentation; check it before commercial work.

Categoryllm_sdxl/jina/IP-Adapter

Inputs (9)

NameTypeDefaultDescription
modelMODEL
jina_ip_adapterJINA_IP_ADAPTER
jina_vision_modelJINA_MODEL
image_1IMAGE
weightFLOAT1.00-10–10
combine_methodCOMBOconcat2 options: concat, average
image_2optIMAGE
image_3optIMAGE
image_4optIMAGE

Outputs (1)

NameTypeDescription
MODELMODEL