Skip to content

[Img2Img] Fix batch size mismatch prompts vs. init images #793

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

Merged
merged 4 commits into from
Oct 12, 2022

Conversation

patrickvonplaten
Copy link
Contributor

@patrickvonplaten patrickvonplaten commented Oct 10, 2022

Make sure init_images and prompts behavior matches.

@patrickvonplaten patrickvonplaten requested review from pcuenca and patil-suraj and removed request for pcuenca October 10, 2022 13:54
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 10, 2022

The documentation is not available anymore as the PR was closed or merged.

@@ -195,6 +195,7 @@ def __call__(
"""
if isinstance(prompt, str):
batch_size = 1
prompt = [prompt]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm planning on cleaning this up more generally when tackling #551

@patrickvonplaten
Copy link
Contributor Author

@pcuenca @patil-suraj would be great if you could review if you have a minute

Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

…sion_img2img.py

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
@patrickvonplaten patrickvonplaten merged commit 6bc1178 into main Oct 12, 2022
@patrickvonplaten patrickvonplaten deleted the correct_batch_size_init_images branch October 12, 2022 11:00
prathikr pushed a commit to prathikr/diffusers that referenced this pull request Oct 26, 2022
…e#793)

* [Img2Img] Fix batch size mismatch prompts vs. init images

* Remove bogus folder

* fix

* Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
…e#793)

* [Img2Img] Fix batch size mismatch prompts vs. init images

* Remove bogus folder

* fix

* Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stable-diffusion Image-to-image pipeline is broken for batch_size > 1
3 participants