-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
update StableDiffusion3Img2ImgPipeline.add image size validation #10166
Conversation
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.
Thanks @ZHJ19970917! I've ran make style
, and the only suggestion is to use keyword args to be consistent with other pipelines usage of self.image_processor.preprocess
src/diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3_img2img.py
Outdated
Show resolved
Hide resolved
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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.
We also need to replicate these changes to src/diffusers/pipelines/pag/pipeline_pag_sd_3_img2img.py
and src/diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3_inpaint.py
due to Copied from
…fusion_3_img2img.py Co-authored-by: hlky <[email protected]>
ok,I will replicate these changes to |
thanks @ZHJ19970917 and @hlky ! |
) * update StableDiffusion3Img2ImgPipeline.add image size validation --------- Co-authored-by: hlky <[email protected]>
What does this PR do?
Fixes #10153
Add support for height and width parameters in the call() method of the StableDiffusion3Img2ImgPipeline. Users can specify the output image size by providing these parameters. Additionally, implement input validation for height and width.
Referencing StableDiffusion3Pipeline, if height and width are not provided, default sizes should be calculated as:
instead of using the dimensions of the input image by default. This prevents errors in vector calculations caused by incompatible height and width values from the input image.
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.