-
Notifications
You must be signed in to change notification settings - Fork 6.1k
[Kolors] Add IP Adapter #8901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Kolors] Add IP Adapter #8901
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, don't forget to set it back in unload_ip_adapter
diffusers/src/diffusers/loaders/ip_adapter.py
Line 300 in a785992
def unload_ip_adapter(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
@stevhliu can you please review the documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Just a few comments to improve clarity 😄
Hello, and thank you for this excellent PR! I'm currently working with a model that's encountering memory issues when loading the IP-Adapter on a single GPU. I noticed that the load_ip_adapter method doesn't seem to support specifying different devices directly. |
AFAIK we don't have a method of separating the IP Adapter from the model device, what you can do is to get the image embeddings before inference. Also, you can split the pipeline modules in different devices too, this guide should be applicable for this use case too. You can even get the text embeddings separately as shown in that guide, so actually the most important part here would be to free the VRAM of the text encoder than separating the IP Adapter into another device. |
* initial draft * apply suggestions * fix failing test * added ipa to img2img * add docs * apply suggestions
What does this PR do?
Add the new released IP Adapter to the Kolors Pipelines
Note: I'll add the img2img after the initial review and after #8856 is merged.
How to test
T2I
IMG2IMG
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@yiyixuxu