divamgupta / divamgupta/diffusionbee-stable-diffusion-ui

Out/Inpainting affects image outside mask

Open
#269 10 comments 7 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
13.6k
Forks
727
PR merge metrics
No merged PRs in 30d

Description

This issue may be inherent to StableDiffusion – I have not tried other inpainting UI's to know if they also exhibit this behavior.

Inpainting causes the parts _not_ under the mask to still change. This makes Inpainting in DiffusionBee quickly degrade input images, losing detail even in the first pass – and causing multiple passes to dramatically erode quality.

This might be naive, but couldn't we composite the masked inpainted result against the original to fix this?

**Tests**

| Original | 1 Run | 5 Runs |
|------------------------------------------------------------------------------------------------------------------------------ |------------------------------------------------------------------------------------------------------------------------------ |-------------------------------------------------------------------------------------------------------------------------- |
| ![f133f](https://user-images.githubusercontent.com/714017/198900448-08f6e715-c537-4951-ba28-2c928b7930e4.jpg) | ![400718_Closedeyes](https://user-images.githubusercontent.com/714017/198900461-b745527a-1688-41bf-8312-ee7788ba0263.png) | ![ƒ32f4](https://user-images.githubusercontent.com/714017/198900486-56aef20c-c3fc-4abd-b328-cc088416bc4b.png) |
| | | ![357046_Closedeye](https://user-images.githubusercontent.com/714017/198900120-b706abf7-ef8d-4392-89b4-6496f53ae52b.png) |

**Masks:**
Screenshot 2022-10-30 at 4 16 35 PM
Screenshot 2022-10-30 at 4 30 53 PM

Source: stock images from Google, I do not own these images.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.