-
Notifications
You must be signed in to change notification settings - Fork 6k
Added Community pipeline for comparing Stable Diffusion v1.1-4 checkpoints #1584
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
Added Community pipeline for comparing Stable Diffusion v1.1-4 checkpoints #1584
Conversation
Signed-off-by: Suvaditya Mukherjee <[email protected]>
The documentation is not available anymore as the PR was closed or merged. |
Hi, @patrickvonplaten! Could you possibly guide me on this issue and let me know if my approach towards solving #873 is correct or are we looking for something else altogether? Thank you for your time! |
Thanks for the PR - could you also add an example here: https://github.com/huggingface/diffusers/blob/main/examples/community/README.md :-) |
Sure thing, will do in a while! |
It seems that |
One possible solution is to accept only the v1.4 model string while using the v1.1-3 models internally. Should I do that instead? |
Would this be an apt example as shown below, in your opinion? It seems that due to the excessive requirement of memory needed to lead 4 Stable Diffusion models into memory, even Google Colab is unable to handle the requirements and goes on to crash (even with from diffusers import DiffusionPipeline
import matplotlib.pyplot as plt
pipe = DiffusionPipeline.from_pretrained('CompVis/stable-diffusion-v1-4', custom_pipeline='suvadityamuk/StableDiffusionComparison')
pipe.enable_attention_slicing()
pipe = pipe.to('cuda')
prompt = "an astronaut riding a horse on mars"
output = pipe(prompt)
plt.subplots(2,2,1)
plt.imshow(output.images[0])
plt.title('Stable Diffusion v1.1')
plt.axis('off')
plt.subplots(2,2,2)
plt.imshow(output.images[1])
plt.title('Stable Diffusion v1.2')
plt.axis('off')
plt.subplots(2,2,3)
plt.imshow(output.images[2])
plt.title('Stable Diffusion v1.3')
plt.axis('off')
plt.subplots(2,2,4)
plt.imshow(output.images[3])
plt.title('Stable Diffusion v1.4')
plt.axis('off')
plt.show() |
…ned and added example Signed-off-by: Suvaditya Mukherjee <[email protected]>
…b.com/suvadityamuk/diffusers into sd1.1-4-comparison-community-pipeline
Signed-off-by: Suvaditya Mukherjee <[email protected]>
Have added the code example and the updated file for the Pipeline where it accepts the v1.4 checkpoint and installs the v1.1-3 checkpoints internally. Is that fine? |
Signed-off-by: Suvaditya Mukherjee <[email protected]>
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.
Great!
Thanks a lot for adding this! |
…oints (huggingface#1584) * Added Community pipeline for comparing Stable Diffusion v1.1-4 Signed-off-by: Suvaditya Mukherjee <[email protected]> * Made changes to provide support for current iteration of from_pretrained and added example Signed-off-by: Suvaditya Mukherjee <[email protected]> * updated a small spelling error Signed-off-by: Suvaditya Mukherjee <[email protected]> * added pipeline entry to table Signed-off-by: Suvaditya Mukherjee <[email protected]> Signed-off-by: Suvaditya Mukherjee <[email protected]>
Fixes #873 to add a Community pipeline that will perform a comparison between the Stable Diffusion v1.1-v1.4 checkpoints parallely.
Takes a general prompt as input and returns a formatted
StableDiffusionPipelineOutput
with the result of each of the four checkpoints.Signed-off-by: Suvaditya Mukherjee [email protected]