-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
.load_ip_adapter in StableDiffusionXLAdapterPipeline #6246
.load_ip_adapter in StableDiffusionXLAdapterPipeline #6246
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. |
@yiyixuxu can you take a look here? |
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! can we fix the tests?
- you need to run 1
make quality
for the code quality test - the other fast test failure should go away once you add the missing comma in
_optional_components = []
src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py
Outdated
Show resolved
Hide resolved
Ahhh sorry just saw your message. Holidays 😅 super busy with family and friends. Apologies. I'll try to get on it asap. Happy holidays. |
…xl_adapter.py Co-authored-by: YiYi Xu <[email protected]>
@yiyixuxu made the changes you suggested. Ran the
As a result, i keep failing the "Fast tests for PRs / Fast PyTorch Pipeline CPU tests (pull_request)" |
After doing some research. I think the reason why i keep getting failures for the components is because of the following block of code:
i added the following two lines(265-266):
Which are not present in the components dictionary of the |
@jquintanilla4 you can update the tests! similar to this PR here https://github.com/huggingface/diffusers/pull/6293/files |
…4/diffusers into loadipa_sdxlAdapterPipeline
@yiyixuxu I added the changes to the test and now all checks have passed 😄 thanks for your feedback |
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.
looking great:)
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.
So good!
* Added testing notebook and .load_ip_adapter to XLAdapterPipeline * Added annotations * deleted testing notebook * Update src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py Co-authored-by: YiYi Xu <[email protected]> * code clean up * Add feature_extractor and image_encoder to components --------- Co-authored-by: YiYi Xu <[email protected]>
What does this PR do?
This PR is referenced in the following issue #6167.
I have purposely laser focused on the StableDiffusionXLAdapterPipeline. I did not touch the regular Stable Diffusion Adapter Pipeline because I didn't wanna go poking and changing stuff that was not previously discussed in the issue, as tempting as it might be 😄.
In short, I added the .load_ip_adapter to the StableDiffusionXLAdapterPipeline. It works great using the regular SDXL models with 30+ steps. It works okay with SDXL Turbo at 6-7 steps. It works not so well with LCM-Lora at 4 steps.
The following is code and images from a temporary notebook to test the results.
LCM-LoRA
SDXL Turbo
Standard SDXL
Notes
pytest tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_adapter.py
and got the following erros:Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
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.
@sayakpaul @yiyixuxu