Allow latent output_type when using StableDiffusionImg2ImgPipeline
Is your feature request related to a problem? Please describe. Currently, the StableDiffusionImg2ImgPipeline cannot output latents the way that the base StableDiffusionPipeline can. I think this would be a very desirable feature, especially with the arrival of the latent upscaler: https://huggingface.co/stabilityai/sd-x2-latent-upscaler
Describe the solution you'd like Allow the user to specify returning latents in StableDiffusionImg2ImgPipeline. It just needs a check before decoding them, the same as in the StableDiffusionPipeline.
Describe alternatives you've considered Creating a custom pipeline to do the same
Additional context No additional context
I think this makes sense. What are your thoughts @yiyixuxu ?
@pcuenca yes - maybe makes sense to add to all other pipelines too?
@thomasnappi we love your suggestion! would you be interested in submitting a PR? 🤗😇
Sorry about the delay - I'm checking with my employer, if they're alright with it, I'd be happy to make a PR for this.
I've updated the pull request for this so that all of the checks have passed. Thank you for your patience!
Closing image as described here https://github.com/huggingface/diffusers/pull/2467#issuecomment-1477199102
Once again, super sorry I didn't catch the duplicated work sooner :(