Stable Diffusion XL Inpainting struggles with masked background areas, often failing to generate new content there #9788
Replies: 2 comments 2 replies
-
I don't find any problems with inpainting in SDXL. What you're essentially doing is a replace vs an insert. Normally for insert you mask the object of interest and fill it in with something new. For replace, you mask the areas you wish to retain and then do this with your mask if a 'PIL' image:
So what you're essentially doing is creating a masked background (reversing the black / white mask areas) of what you want to replace. padding_mask_crop is similar to dilation in image segmentation. It expands your mask area by 'X' number of pixels. Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
cc @asomoza |
Beta Was this translation helpful? Give feedback.
-
I am working on an Inpainting task and I am using Stable diffusion XL 1.0 Inpainting. It is working very well when I mask people, animals or objects, but when I give it a mask of background, it doesn't generate anything and give me the original input image. I have tried changing parameters as well but nothing could make it work. Below is the approach I am using:
I can't understand how to make this work as this is one of the primary requirements.
Beta Was this translation helpful? Give feedback.
All reactions