Skip to content

feat: add IP-Adapter Plus (Resampler image projection) support - #1839

Open
fszontagh wants to merge 1 commit into
leejet:masterfrom
fszontagh:feat/ip-adapter-plus-v2
Open

feat: add IP-Adapter Plus (Resampler image projection) support#1839
fszontagh wants to merge 1 commit into
leejet:masterfrom
fszontagh:feat/ip-adapter-plus-v2

Conversation

@fszontagh

Copy link
Copy Markdown
Contributor

Summary

Adds IP-Adapter Plus support on top of #1803. Plus checkpoints replace the small linear image_proj with a Resampler (Perceiver-style) that attends over the CLIP-Vision hidden states and emits more image tokens (16 vs 4), transferring finer detail from the reference.

The variant is auto-detected from the weight file (presence of image_proj.latents), and all Resampler dimensions are read from tensor shapes, so no new flags are needed - the existing --ip-adapter / --ip-adapter-image / --ip-adapter-strength options work for both classic and Plus. Plus uses the penultimate, unpooled CLIP-Vision hidden states; the classic path and the existing conditional/unconditional CFG handling are unchanged.

Related Issue / Discussion

Follow-up to #1803 (IP-Adapter). Covers the ip-adapter-plus_sd15 and ip-adapter-plus_sdxl_vit-h weights.

Additional Information

Verified with h94/IP-Adapter weights + CLIP ViT-H:

  • SD 1.5 Plus (ip-adapter-plus_sd15): all 83 tensors bind, logs IP-Adapter: 16 image tokens, produces a coherent reference-conditioned image that is distinctly finer than the classic adapter at identical settings.
  • SDXL Plus (ip-adapter-plus_sdxl_vit-h): all 191 tensors bind and the Resampler projects 16 tokens (dims auto-detected: dim 1280, output 2048).

Docs added under docs/ip_adapter.md (new "Plus variants" section).

Checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant