Added Community pipeline for comparing Stable Diffusion v1.1-4 checkpoints#1584
Added Community pipeline for comparing Stable Diffusion v1.1-4 checkpoints#1584patrickvonplaten merged 14 commits intohuggingface:mainfrom suvadityamuk:sd1.1-4-comparison-community-pipeline
Conversation
Signed-off-by: Suvaditya Mukherjee <suvadityamuk@gmail.com>
|
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 <suvadityamuk@gmail.com>
…b.com/suvadityamuk/diffusers into sd1.1-4-comparison-community-pipeline
Signed-off-by: Suvaditya Mukherjee <suvadityamuk@gmail.com>
|
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 <suvadityamuk@gmail.com>
|
Thanks a lot for adding this! |
…oints (huggingface#1584) * Added Community pipeline for comparing Stable Diffusion v1.1-4 Signed-off-by: Suvaditya Mukherjee <suvadityamuk@gmail.com> * Made changes to provide support for current iteration of from_pretrained and added example Signed-off-by: Suvaditya Mukherjee <suvadityamuk@gmail.com> * updated a small spelling error Signed-off-by: Suvaditya Mukherjee <suvadityamuk@gmail.com> * added pipeline entry to table Signed-off-by: Suvaditya Mukherjee <suvadityamuk@gmail.com> Signed-off-by: Suvaditya Mukherjee <suvadityamuk@gmail.com>
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
StableDiffusionPipelineOutputwith the result of each of the four checkpoints.Signed-off-by: Suvaditya Mukherjee suvadityamuk@gmail.com