Skip to content
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

Standardize on init_image for img2img, inpaint, and others #1257

Closed
fboulnois opened this issue Nov 11, 2022 · 2 comments · Fixed by #1361
Closed

Standardize on init_image for img2img, inpaint, and others #1257

fboulnois opened this issue Nov 11, 2022 · 2 comments · Fixed by #1361
Assignees

Comments

@fboulnois
Copy link
Contributor

What API design would you like to have changed or added to the library? Why?

img2img currently uses the init_image parameter, whereas inpaint uses the image parameter.

What use case would this enable or better enable? Can you give us a code example?

I have some code that dynamically switches between StableDiffusionPipeline, StableDiffusionImg2ImgPipeline, and StableDiffusionInpaintPipeline based on whether an image and mask are provided, and standardizing on init_image would simplify the pipeline call (instead of checking beforehand / supplying unused parameters):

pipeline(prompt, init_image=image, ...)
@patrickvonplaten
Copy link
Contributor

fair point! Would be ok with just using image=... everywhere. What do you think @pcuenca , @patil-suraj @anton-l ?

@pcuenca
Copy link
Member

pcuenca commented Nov 17, 2022

I agree, it's a good point and I'd rather standardize on image rather than init_image. @fboulnois would you like to open a PR with that? It's totally cool if you don't have time though :)

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 a pull request may close this issue.

4 participants