Is it possible to inpaint only the masked area?
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 sameIs there something analogous on StableDiffusionInpaintPipeline?thanks
2023-05-22T18:32:24Z
Unless I’m mistaken, this is how the inpaint pipeline works? Or at least the IF inpaint pipeline works this way. Could you provide a code snippet?
2023-05-23T03:33:22Z
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 articleandthis github discussionreference pages elaborates it. I myself trying to implement that feature using diffusers, finding it hard.P.S.This reddit threadalso elaborates.
2023-06-19T12:41:58Z
Same here… do you find any solution? I am stucked
2023-12-25T10:29:30Z
Did this issue ever get solved?
2024-06-22T22:42:21Z
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 bypadding_mask_cropparameter to get the same effect as “Only masked” area inpainting:result= pipe('prompt', image=image, mask_image=mask_image, strength=0.75,generator=generator, padding_mask_crop=32)More info and examplehere.
2024-06-28T04:12:30Z
I have just given it a try this morning but it does not seem to work