Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Inpaint thinks black background is part of the mask #8288

Open
1 task done
Photosounder opened this issue Mar 3, 2023 · 0 comments
Open
1 task done

[Bug]: Inpaint thinks black background is part of the mask #8288

Photosounder opened this issue Mar 3, 2023 · 0 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@Photosounder
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

I take an image that was created with txt2img, modified with inpainting, then modified with an image editor (Photopea) before being put back into Inpaint. It happens to have a large area that is #000000 total black. When I try to inpaint part of the image, it includes much of that black background as if it was part of the mask. When in the image editor I add #010000 to remove the black background then the problem goes away. Therefore it seems that inpainting treats #000000 pixels as if they were part of the mask.

Steps to reproduce the problem

  1. Go to Inpaint
  2. Load an image with a black background like https://www.mediafire.com/view/j6t1kfqan8tk2wb/15360-black_background.png/file
  3. Inpaint literally anything, like say a hand
  4. Select Only masked
  5. See how the black background area is included
  6. Do the same with an image with no black background like https://www.mediafire.com/view/mqddujgu07godfi/15360-red_background.png/file
  7. See how only the masked area is included

Pic is what happens with the black background when only the hand is inpainted
2023-03-03 14 41 00

What should have happened?

Pic is what happens with the #010000 background when only the hand is inpainted (same everything as the previous screenshot).
2023-03-03 14 41 36

Commit where the problem happens

0cc0ee1

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--medvram --opt-split-attention --skip-torch-cuda-test --opt-sub-quad-attention

List of extensions

Extension URL Version Update
openpose-editor https://github.com/fkunn1326/openpose-editor.git cc742cb8 (Mon Feb 27 23:26:31 2023) unknown
sd-webui-controlnet https://github.com/Mikubill/sd-webui-controlnet 3a1c5b9 (Mon Feb 27 19:57:39 2023) unknown
LDSR built-in    
Lora built-in    
ScuNET built-in    
SwinIR built-in    
prompt-bracket-checker built-in    

Console logs

venv "C:\msys\home\sd\sd\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8
Installing requirements for Web UI

Launching Web UI with arguments: --medvram --opt-split-attention --opt-sub-quad-attention
No module 'xformers'. Proceeding without it.
Loading weights [03df69045a] from C:\msys\home\sd\sd\models\Stable-diffusion\stablydiffuseds_26.safetensors
Creating model from config: C:\msys\home\sd\sd\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Loading VAE weights specified in settings: C:\msys\home\sd\sd\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors
Applying sub-quadratic cross attention optimization.
Textual inversion embeddings loaded(2): bad_prompt_version2, bottomless_embed
Model loaded in 10.8s (load weights from disk: 0.3s, create model: 1.2s, apply weights to model: 6.6s, apply half(): 1.9s, load VAE: 0.7s).
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
  9%|███████▊                                                                           | 3/32 [00:14<02:16,  4.71s/it]
Total progress:   0%|                                                               | 3/3200 [00:12<3:44:59,  4.22s/it]
100%|██████████████████████████████████████████████████████████████████████████████████| 32/32 [02:34<00:00,  4.83s/it]
100%|██████████████████████████████████████████████████████████████████████████████████| 32/32 [02:37<00:00,  4.91s/it]
 97%|███████████████████████████████████████████████████████████████████████████████▍  | 31/32 [02:33<00:04,  4.91s/it]
Total progress:   3%|█▊                                                            | 95/3200 [07:45<4:14:00,  4.91s/it]

Additional information

No response

@Photosounder Photosounder added the bug-report Report of a bug, yet to be confirmed label Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

1 participant