-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
allow explicit tokenizer & text_encoder in unload_textual_inversion #6977
Conversation
Hi, Thanks for your PR. Could you also add an example snippet that shows the usage? @yiyixuxu WDYT? |
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. |
@sayakpaul Ive added a snippet based on the example demonstrated here by @linoytsaban, I hope it's OK. |
cc @fabiorigano 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.
thanks @yiyixuxu for adding me here
looks good to me. I left a few nits
Co-authored-by: Fabio Rigano <fabio2rigano@gmail.com>
Co-authored-by: Fabio Rigano <fabio2rigano@gmail.com>
Co-authored-by: Fabio Rigano <fabio2rigano@gmail.com>
Co-authored-by: Fabio Rigano <fabio2rigano@gmail.com>
Co-authored-by: Fabio Rigano <fabio2rigano@gmail.com>
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.
LGTM!
What does this PR do?
Fixes #6974
Currently,
unload_textual_inversion
only performs unload to tokenizer & text_encoder, originally designed for SD pipelines but doesn't support SDXL, which also uses tokenizer_2 & text_encoder_2.By allowing passing explicitly the tokenizer & text_encoder to unload textual inversion modules (just like it allows in the
load_textual_inversion
function) we can support fully unload in SDXL pipelines as well.Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@sayakpaul @linoytsaban