Fix textual inversion SDXL and add support for 2nd text encoder#9010
Merged
sayakpaul merged 4 commits intohuggingface:mainfrom Aug 9, 2024
Merged
Fix textual inversion SDXL and add support for 2nd text encoder#9010sayakpaul merged 4 commits intohuggingface:mainfrom
sayakpaul merged 4 commits intohuggingface:mainfrom
Conversation
Signed-off-by: Daniel Socek <daniel.socek@intel.com>
35eea48 to
72bcdf0
Compare
Contributor
Author
|
@patrickvonplaten could kindly help assign appropriate reviewers if bandwidth is available? |
Contributor
Author
|
cc: @sayakpaul @yiyixuxu |
Member
|
Thanks very much for the fix. Will merge as soon as the CI is green. |
|
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. |
Signed-off-by: Daniel Socek <daniel.socek@intel.com>
Contributor
Author
|
@sayakpaul Thanks, I seem to forgot to run make style/quality, just added a style fix commit |
Member
|
Thanks for your awesome contributions! |
Contributor
Author
|
@sayakpaul Thank you very much for taking time to review! |
sayakpaul
added a commit
that referenced
this pull request
Dec 23, 2024
* Fix textual inversion SDXL and add support for 2nd text encoder Signed-off-by: Daniel Socek <daniel.socek@intel.com> * Fix style/quality of text inv for sdxl Signed-off-by: Daniel Socek <daniel.socek@intel.com> --------- Signed-off-by: Daniel Socek <daniel.socek@intel.com> Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix Textual Inversion SDXL fine-tuning and add support for training 2nd text encoder
Textual inversion for SDXL fine tuning script is not working as no guidance from new token is resembled in generated images.
Training Set
./cat(6 images):Results Before Fix:
Training:
Inference:
Output (from 4 inferences):

These results show no or very poor guidance from the object token.
Results After Fix:
Same Training command
Same Inference script Output (4 inferences):

Good guidance is shown after fix (and this is after only 500 training/fine-tuning steps)
Also, now we also infer with the 2nd text encoder:
Output with 2nd text encoder from 4 inferences:

This PR also updates documentation with inference examples (see
README_sdxl.md)