automatic icon indicating copy to clipboard operation
automatic copied to clipboard

[Issue]: Diffusers inpainting does not match original backend - Entire image instead of masked area is inpainted regardless of settings

Open Machinekng opened this issue 2 years ago • 2 comments

Issue Description

In the original backend, using the masking brush tool or a manual mask, only the desired area (masked for "Inpaint mask" or not masked for "Inpaint not masked") would be processed while the rest of the image would be preserved. In the current diffusers inpainting, the entire image is denoised. This is undesirable, as since the entire image is denoised it means that the masked area does not match with the image at higher noise levels, which means it is not possible to do things like object removal (which can be done using the Masked content: fill option in the original backend.)

Earlier versions of diffusers inpainting (I believe before the the 12-30 update) worked like the original backend, so this may be a bug.

Inpainting settings for both tests: image

Diffusers backend Live Preview image Final image

Original backend (desired behavior) Live Preview image Final image

Version Platform Description

Version app: SD.next updated: 2023-12-30 hash: https://github.com/vladmandic/automatic/commit/ab7b78ccf4bf8e0145c846525e6ddb428c7309d8 url: https://github.com/vladmandic/automatic/tree/master

Platform arch: AMD64 cpu: Intel64 Family 6 Model 151 Stepping 2, GenuineIntel system: Windows release: Windows-10-10.0.19045-SP0 python: 3.11.5

GPU device: NVIDIA GeForce RTX 3080 (1) (sm_90) (8, 6) cuda: 12.1 cudnn: 8801 driver: 546.01

Browser: Mozilla Firefox

Relevant log output

No response

Backend

Diffusers

Branch

Master

Model

SD 1.5

Acknowledgements

  • [X] I have read the above and searched for existing issues
  • [X] I confirm that this is classified correctly and its not an extension issue

Machinekng avatar Jan 11 '24 14:01 Machinekng

I tried out the dev branch, and it's working much better, so this issue is probably already fixed: image

Machinekng avatar Jan 11 '24 15:01 Machinekng

Talked to Xedis on the discord, and got permission from them to close since the issue is already fixed in dev.

Machinekng avatar Jan 11 '24 15:01 Machinekng