stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

Inpainting is broken

Open Semisol opened this issue 2 years ago • 17 comments

Describe the bug Inpainting is broken

To Reproduce Steps to reproduce the behavior:

  1. Go to inpaint
  2. Try to inpaint an image with a drawn mask
  3. The output is the same as input

Expected behavior Inpainting works

Desktop (please complete the following information):

  • OS: macOS, running on Colab
  • Browser: Brave
  • Commit revision: 67d011b02eddc20202b654dfea56528de3d5edf7

Semisol avatar Oct 05 '22 17:10 Semisol

can confirm, latent noise is selected, mask is drawn, prompt for inpaint is given, masked area stays as original after resampling.

crckdns avatar Oct 05 '22 18:10 crckdns

can confirm, latent noise is selected, mask is drawn, prompt for inpaint is given, masked area stays as original after resampling.

from inspecting myself no mask is being sent to the server, the mask image is all black

Semisol avatar Oct 05 '22 18:10 Semisol

In my experience that happens when you have a browser addon that interferes with the mask generation, try a different browser or incognito mode/disable addons and report back.

DonStroganotti avatar Oct 05 '22 19:10 DonStroganotti

Do you still have the drawing tool selected? In my experience you need to unselect it before inpainting works.

ProGamerGov avatar Oct 05 '22 19:10 ProGamerGov

In my experience that happens when you have a browser addon that interferes with the mask generation, try a different browser or incognito mode/disable addons and report back.

I tried Safari no luck with that.

Do you still have the drawing tool selected? In my experience you need to unselect it before inpainting works.

I don't know how to unselect it.

Semisol avatar Oct 05 '22 20:10 Semisol

tried with edge (no plugins/addons, clean) and firefox in incognito mode, same behaviour. mask is beeing transmitted, as when I select latent noise, the masked area IS being worked on, but reverts in the end to original.

crckdns avatar Oct 05 '22 20:10 crckdns

Inpainting works for me with Firefox but I get the same problem in Img2Img as you describe above. Weirdness.

mayofiddler avatar Oct 05 '22 20:10 mayofiddler

i did not occur any problem, like the one described. two problem though I ve got still with the latest version regarding inpainting:

1.inserting a picture in the img2img tab and then trying to send it inpainting (without new results, the original image) leads to an error after which a new tab with SD has to be created in order to be able to add an image to inpainting again. 2. When I send the result of inpainting to the inpainting tab again, the old mask remains hidden but active, so I have to click the undo-button until it's removed.

a3nima avatar Oct 06 '22 08:10 a3nima

Inpainting throws this error for me if there is any new lines in the prompt.

AttributeError: 'NoneType' object has no attribute 'groups'

Kadah avatar Oct 06 '22 10:10 Kadah

I get this as well. In my case, it seems to happen when I draw a mask over two different areas. When I only draw one, it works correctly.

pcoffey42 avatar Oct 10 '22 05:10 pcoffey42

I have done some digging on this, as well. It does not work in Firefox, Firefox protected mode, or Edge with some extensions (brighthire and loom) enabled. It does work in Edge with adblock, bitwarden, and raindrop extensions enabled.

The feature does appear to work (at least with 1 mask area), but I haven't found the culprit in Firefox, yet.

penguincoder avatar Oct 11 '22 13:10 penguincoder

I have done some digging on this, as well. It does not work in Firefox, Firefox protected mode, or Edge with some extensions (brighthire and loom) enabled. It does work in Edge with adblock, bitwarden, and raindrop extensions enabled.

The feature does appear to work (at least with 1 mask area), but I haven't found the culprit in Firefox, yet.

I had same issue until DuckDuckGo Privacy Essentials is disabled. Maybe this plugin breaks inpaint

Hime-Hina avatar Oct 16 '22 16:10 Hime-Hina

that's definitely the culprit on my machine. great find!

penguincoder avatar Oct 17 '22 14:10 penguincoder

This is working for me now in Firefox with none of the above fixes.

mayofiddler avatar Oct 17 '22 17:10 mayofiddler

Still not working for me with above fixes, in Firefox or in Chrome. Incognito with all plugins disabled for both, output still the same as input. Notably, setting the inpaint to not masked covers the entire area, so it appears the mask is not being interpreted at all.

BadgerJack avatar Oct 20 '22 08:10 BadgerJack

I had this same issue where the inpaint would ignore my mask sometimes. Really frustrating, but @DonStroganotti mentioned an addon could be the culprit. I went through my plugins one by one and it turns out it was "Canvas Fingerprint Defender". If you have the same addon, try turning it off and refreshing your WebUI page. Worked for me!

TLDR; If you have the addon "Canvas Fingerprint Defender", try to disable it and refresh WebUI page.

FluorescentApe avatar Oct 24 '22 15:10 FluorescentApe

Feels like it works once in a blue fuckin moon. Then just breaks. Would be awesome if conflicting variables that cause it to crash would offer user-friend messages besides "right is bigger than left." Feel like I move one step forward every 12 hours I fight with in painting to be useful. I had to mask the entire scene and select inpaint not masked just to accomplish a minor addition to the scene. At one point yesterday or day before, don't even remember what day it is anymore, I did a fresh install and setup. Sorry frustrated as all hell. Thanks for your hard work for an awesome free interface.

myndxero avatar Nov 04 '22 14:11 myndxero

I have done some digging on this, as well. It does not work in Firefox, Firefox protected mode, or Edge with some extensions (brighthire and loom) enabled. It does work in Edge with adblock, bitwarden, and raindrop extensions enabled. The feature does appear to work (at least with 1 mask area), but I haven't found the culprit in Firefox, yet.

I had same issue until DuckDuckGo Privacy Essentials is disabled. Maybe this plugin breaks inpaint

Same experience here: the same problem with DuckDuckGo Privacy Essential enabled; disabling it fix the problem. Also, if the plugin is disabled for the incognito mode, then AUTOMATIC1111 works in incognito mode.

MagicAlien avatar Nov 22 '22 18:11 MagicAlien

Same experience here: the same problem with DuckDuckGo Privacy Essential enabled; disabling it fix the problem. Also, if the plugin is disabled for the incognito mode, then AUTOMATIC1111 works in incognito mode.

I've completely given up on inpainting in the app and abandoned the notion I'd never need photoshop again. I use both in conjunction now, it's easier to mask in photoshop anyway but maybe a little more tedious if you only need a simple inpaint action.

Thanks for digging in though, maybe it will help extension authors to address the conflict.

myndxero avatar Nov 22 '22 18:11 myndxero

If i understand correctly, the solution is to temporarily disable DuckDuckGo Privacy Essential. Closing this one, since there's no apparent fix from the repo side. If anyone still experiences this, please let me know.

mezotaken avatar Jan 16 '23 19:01 mezotaken

COMPLETELY BROKEN

WillyamBradberry avatar Feb 24 '23 14:02 WillyamBradberry

Necroposting, but I just wanted to say THANK YOU to everyone in this post, especially @FluorescentApe, @DonStroganotti, and @mezotaken. I've been using SD and AUTO1111 for months now, and inpainting has never worked for me...ever. I only recently (in the past few days) discovered a workaround by using a combination of manually drawn Photoshop masks and Inpaint Upload. It never occurred to me that a browser extension was breaking the regular Inpaint. After giving up on inpainting for almost half a year, I've finally gotten it to work in my Firefox browser by disabling CanvasBlocker, a fingerprint-blocking extension, and DuckDuckGo Privacy Essentials like everyone mentioned.

Finally. FINALLY Inpainting works!!! Thanks again! 🙌🏾

(I was brought here by searching DuckDuckGo, ironically, for a solution to this problem, after discovering inpainting did work in Chrome for some reason. I got to this issue first, which then brought me here. Lol)

genialgenteel avatar May 28 '23 17:05 genialgenteel