Code example - Interpolation between prompts for SDXL #7581
asomoza
started this conversation in
Show and tell
Replies: 1 comment
-
Another one: https://github.com/huggingface/cookbook/blob/main/notebooks/en/stable_diffusion_interpolation.ipynb |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, this is a code example for doing interpolation between prompts with SDXL since the online examples are only for SD 1.5.
I did this because of #7568 and I always had in mind to understand and test how to do this.
Basically what I did is use the pipeline functions instead of using the models (tokenizers and text encoders) to skip doing it for each one and also I used a
lighting lora
instead of theturbo model
because I like it more and to show that you can use it with any model you want.Both of these models don't need to use the
classifier free guidance
so I didn't use the interpolation on the negative prompts but if you want to use them it should be easy to add.Here's the result between these prompts:
prompt one = "A cinematic shot of a baby racoon wearing an intricate italian priest robe."
prompt_two = "A cinematic shot of a baby rabbit wearing an tuxedo."
Had to resize the original image because it was too big.
Here's the code:
Beta Was this translation helpful? Give feedback.
All reactions