Open bparrott78 opened 1 year ago
On further testing I can confirm this does not happen the first time the mask is drawn, but if you send the result back to inpaint, the original mask persists no matter how many times you attempt to clear it. However, if you press the 'x' to close the picture then send to inpaint, the correct mask is applied.
Increase mask blur, default = 4 Only masked padding = 32
Increase mask blur, default = 4 Only masked padding = 32
Does nothing.
Automatic1111 has a bug where if you don't press the x button it will not clear the previous maskings even though you can't see it. You can test this out yourself by applying a mask, then sending another image for inpainting and them generate, it will use the previous mask along with the current mask if you don't press x.
It's not that. The issue is that the mask itself doesn't adhere to the boundaries. Typically you'll get a zoomed in picture of where the masking is being applied - the problem is that the masking doesn't apply to that zoomed in picture. It denoises and inpaints the whole area instead of just the masked part.
It's not that. The issue is that the mask itself doesn't adhere to the boundaries. Typically you'll get a zoomed in picture of where the masking is being applied - the problem is that the masking doesn't apply to that zoomed in picture. It denoises and inpaints the whole area instead of just the masked part.
I have the same issue trying to inpaint a hand and it process the whole image instead of just the hand, I have no idea what is causing this and it was working earlier this day. I dont know if something automatically updated or whatever but inpainting Only masked part is not working anymore. So I have to process the whole image. Let be honest on 6000PX image it is not something I want to do.
So far I restarted webui a couple of time refreshed the interface rebooted ect.. I just do not revert back to a working state. And I have no idea how to diagnose or report what is going on as there is no error message or log or anything. It just process the whole image and dont care about the "Only masked" option.
There is other report of the same or a similar bug. But I am not sure it is 100% it is identical. As this in this case the mask is working while some other case have the mask not working. So this is specifically about not cropping the image before processing it.
I've found this happens repeatably if you're using the upload mask feature and you've resized the mask image before uploading even if it doesn't affect the mask drawing itself (e.x. expanding the canvas so it matches the base image resolution then resaving). Even if it looks correct visually, there's something about how the mask is interpreted that causes large rectangular blocks around the mask to also be inpainted.
The easiest fix when this happens is to recreate the mask image in the matching base resolution and do not resize the canvas afterwards.
It also seems to bug out similarly if your mask covers multiple separate areas of the image or touches too much of the edge of the image.
Not sure if this is related but I found masks touching or close to the edge seem to bleed. The best way to see what is happening is to enable "For inpainting, save a copy of the greyscale mask" you get an image of the mask and you can see extra mask elements. For me if it touches the edge it usually makes a rectangle running along that whole edge. Even close to the edge masks like a big circle. I had some success with upload mask but again if that mask is on the edge it bleeds. Usually if I am using inpainting to increase the canvas size.
Is there an existing issue for this?
What happened?
When using inpainting->only masked, instead of using the precise mask, a rectangle is drawn at the resolution requested, but everything within the rectangle is denoised and replaced.
![image](https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/17459396/a2ceda22-981e-489e-94e6-fe2f3adc4554)
You can see from the above that I've very deliberately drawn an oddly shaped mask but the result shows that a rectangle around the mask is affected.
Steps to reproduce the problem
What should have happened?
The mask should precisely mark the edges of area affected.
Version or Commit where the problem happens
1.4.0.
What Python version are you running on ?
Python 3.10.x
What platforms do you use to access the UI ?
Windows
What device are you running WebUI on?
Nvidia GPUs (RTX 20 above)
Cross attention optimization
sdp-no-mem
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
List of extensions
Console logs
Additional information
No response