{{ message }}
Repository navigation
add sdxl to prompt weighting - #4439
Merged
Merged
Conversation
patrickvonplaten
commented
Aug 2, 2023
patrickvonplaten
commented
Aug 2, 2023
Contributor
Author
|
The documentation is not available anymore as the PR was closed or merged. |
sayakpaul
reviewed
Aug 2, 2023
Comment on lines
+121
to
+127
| Let's first make sure we have the newest version of compel installed: | ||
|
|
||
| ``` | ||
| pip install --upgrade compel | ||
| ``` | ||
|
|
||
| Now we can run an example. |
Member
There was a problem hiding this comment.
I feel like this should go before the StableDiffusionPipeline example as repeating it becomes kind of redundant.
sayakpaul
reviewed
Aug 2, 2023
Comment on lines
+133
to
+135
| pipeline = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", variant="fp16", use_safetensors=True, torch_dtype=torch.float16).to("cuda") | ||
|
|
||
| compel = Compel(tokenizer=[pipeline.tokenizer, pipeline.tokenizer_2] , text_encoder=[pipeline.text_encoder, pipeline.text_encoder_2], returned_embeddings_type=ReturnedEmbeddingsType.PENULTIMATE_HIDDEN_STATES_NON_NORMALIZED, requires_pooled=[False, True]) |
Member
There was a problem hiding this comment.
Also, let's leave a link to what ReturnedEmbeddingsType.PENULTIMATE_HIDDEN_STATES_NON_NORMALIZED means otherwise it might get confusing for the readers.
stevhliu
approved these changes
Aug 2, 2023
Member
There was a problem hiding this comment.
I think it'd look nicer to compare the images side-by-side (you can copy the code here).
Contributor
Author
There was a problem hiding this comment.
Thanks a lot
patrickvonplaten
commented
Aug 3, 2023
patrickvonplaten
commented
Aug 3, 2023
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
patrickvonplaten
commented
Aug 3, 2023
patrickvonplaten
commented
Aug 3, 2023
patrickvonplaten
commented
Aug 3, 2023
AmericanPresidentJimmyCarter
pushed a commit
to AmericanPresidentJimmyCarter/diffusers
that referenced
this pull request
Apr 26, 2024
* add sdxl to prompt weighting * Update docs/source/en/using-diffusers/weighted_prompts.md * Update docs/source/en/using-diffusers/weighted_prompts.md * add sdxl to prompt weighting * Apply suggestions from code review Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Apply suggestions from code review * Update docs/source/en/using-diffusers/weighted_prompts.md * Apply suggestions from code review * correct --------- Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.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.

What does this PR do?
Since 2.0.1 the compel library supports SDXL - this PR updates the docs to give the user a nice example.
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.