Hi all!
In the stable-diffusion-ui there is an option to select if we want to inpaint the whole picture or only the selected area. It means that its guaranteed that the rest of the image will stay the same
Is there something analogous on StableDiffusionInpaintPipeline?
In Stable Diffusion, “Inpaint Area” changes which part of the image is inpainted. If you use whole picture, this will change only the masked part while considering the rest of the image as a reference, while if you click on “Only Masked” only that part of the image will be recreated, only the part you masked will be referenced. This article and this github discussion reference pages elaborates it. I myself trying to implement that feature using diffusers, finding it hard.
Since this is one of top results in searching for this subject using automation 1111 keywords, for anyone coming to this old post from the search results:
This is implemented in diffusers library. You only need to add your desired padding by padding_mask_crop parameter to get the same effect as “Only masked” area inpainting: