Skip to content

IP Adapter Image Embeds - Compatibility with ComfyUI and other libraries/apps #6925

@asomoza

Description

@asomoza

Since we now have this PR #6868 merged and as suggested in this comment #6868 (comment) I'm opening this issue to discuss the option to make the embeds for IP Adapters compatible with ComfyUI and other systems.

I've prepared a collab to demonstrate the issue right now:

https://colab.research.google.com/drive/1vMSxzM0bnOzkqB7KcOBtOx0MKUJSMNKm?usp=sharing

Basically ComfyUI, InvokeAI and probably all other apps do the image projection at the same time when encoding the images but diffusers does it later in the forward of the unet here:

image_embeds = self.encoder_hid_proj(image_embeds)

The solution will be that diffusers also do the image projection when encoding the images.

@yiyixuxu @sayakpaul is it possible? or maybe you have other possible solutions for this?

Also I found another issue while testing that would be good to discuss but maybe I should open another issue for it, what I found is that one of the key features of being able to pass the embeds is that we don't need to load the image encoder, but currently the pipelines force you to either pass the image encoder or try to load it automatically.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions