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] Outpaint black image #3

Closed
Rogal80 opened this issue Dec 23, 2022 · 39 comments · Fixed by zero01101/openOutpaint#145
Closed

[Bug] Outpaint black image #3

Rogal80 opened this issue Dec 23, 2022 · 39 comments · Fixed by zero01101/openOutpaint#145
Labels
bug Something isn't working eval Waiting for evaluation of a solution external There is some external dependency for this issue

Comments

@Rogal80
Copy link

Rogal80 commented Dec 23, 2022

Hi, maybe I am doing something wrong – but no matter how many times I use the dream for outpaint i have always black image

image

any clue? ( inpainting mask is set on 1)

@zero01101
Copy link
Owner

hm, not familiar with that model you're using, is it an inpainting model? or maybe is it based off of a v2 model? i believe people have ran into that kind of thing with SD/webUI directly with v2 models - might be worth disabling --no-half in your webui-user script, or maybe installing DH patches extension to see if it still occurs.

does that occur if you use the runwayML inpainting model?

@Rogal80
Copy link
Author

Rogal80 commented Dec 23, 2022

This is inpainting model merged with others, but also I tried with base 1.5 inpaint model – same results

@Rogal80
Copy link
Author

Rogal80 commented Dec 23, 2022

I already removed Outpaint from extension and reinstall but nothing happen – same issue, and after reinstall setting wasn't default

@zero01101
Copy link
Owner

@Rogal80
Copy link
Author

Rogal80 commented Dec 23, 2022

i have 3090 and i am using this set COMMANDLINE_ARGS=--xformers --allow-code --api --listen --enable-insecure-extension-access --gradio-img2img-tool editor

@zero01101
Copy link
Owner

huh... well you've definitely got the hardware for it; i've never ran into this and you're the first to report such things happening, but i'm still pretty certain it's more of an SD/webUI thing than openOutpaint just because we don't actually do any image generation or processing, just send API calls to webUI and then manipulate the results it delivers...

AUTOMATIC1111/stable-diffusion-webui#5757 (comment) mentions that it could be an issue with the VAE but also specifies high resolutions, and you're using 512x512... might be worth trying anyway? sorry i don't have a "oh yeah simple fix, just do x y z" for you :/

@Rogal80
Copy link
Author

Rogal80 commented Dec 23, 2022

anyway thx - inpainting works perfectly :)

@Rogal80
Copy link
Author

Rogal80 commented Dec 23, 2022

How can I reinstall? That will be like fresh extension because removing folder and reinstall still keeps old settings

@zero01101
Copy link
Owner

openOutpaint saves a few settings to your browser's localstorage (and indexedDB if you've imported or created any stamp resources) - if you open the "debug settings" menu there's a "reset to defaults" button that clears the localstorage (and indexedDB if there are any) records, and after that removing the openOutpaint-webUI-extension folder should be pretty much it. nothing gets added to your python venv or anything of that nature

@Rogal80
Copy link
Author

Rogal80 commented Dec 23, 2022

thx

@seijihariki
Copy link
Collaborator

@Rogal80 is it working now?

@seijihariki seijihariki added the bug Something isn't working label Dec 24, 2022
@Rogal80
Copy link
Author

Rogal80 commented Dec 24, 2022

Hi, still same :
image

@seijihariki
Copy link
Collaborator

I have sent some debugging tools to the main branch. Update the extension, enable debug in Debug Info tab, and try again.

Send us the resulting debugging image for the outpaint attempt.

@seijihariki seijihariki added question Further information is requested waiting Waiting for something to be performed by the author and removed question Further information is requested labels Dec 24, 2022
@Lesteriax
Copy link

Lesteriax commented Dec 26, 2022

I'm having the same issue, I thought I was doing something wrong with the openOutpaint settings.

Using img2img always gives me black results when trying to outpaint using vanilla inpaint1.5

I'm using paperpsace version, tried with and without --no-half and medvram.

below screenshot and i also attached the debug image

image

openOutpaint_debug_Mon Dec 26 2022 13_42_59

@seijihariki
Copy link
Collaborator

Oh, outpainting almost always requires a 1 for denoising, as less than that will keep quite a lot of black pixels on the non-image part of the image. (Transparent pixels are sent as black to stable diffusion, as it can't really handle transparency)

Worse still, keep border gradient keeps the full black outline on the transparent areas, so stable diffusion sees the image with literally half of it black and extrapolates that it is indeed half-black.

For outpainting, it is recommended to use the dream tool instead of the img2img one. It always uses 1 as denoising strength, and automatically masks things to keep current imagery as is, and generates on transparent pixels.

@Rogal80
Copy link
Author

Rogal80 commented Dec 26, 2022

hi, debug output :
openOutpaint_debug_Mon Dec 26 2022 12 24 08 GMT+0100 (Central European Standard Time)

@seijihariki
Copy link
Collaborator

That's... Very weird. Top should be image sent, bottom should be mask, as shown in Lesteriax's.

If they are both showing the original image, makes sense that the black area is continuing to be black...

@zero01101 maybe is some globalComposite weirdness?

@seijihariki
Copy link
Collaborator

@Rogal80 what browser are you using?

@Rogal80
Copy link
Author

Rogal80 commented Dec 26, 2022

Firefox, windows 10

@Rogal80
Copy link
Author

Rogal80 commented Dec 26, 2022

I notice that in chrome it's working, is there any chance to fix this in Firefox :
image
openOutpaint_debug_Mon Dec 26 2022 13_42_34 GMT+0100 (Central European Standard Time)

@Lesteriax
Copy link

Dreaming can do outpaintng as opposed to img2img.

problem with with dream is that outpainting produces weird results. I tried the monalisa and prompted for a painting with a beautiful woman and it gave me 3 headed monalisa.

@zero01101
Copy link
Owner

zero01101 commented Dec 26, 2022

@zero01101 maybe is some globalComposite weirdness?

¯\_(ツ)_/¯ yeah, that is just bonkers; i'm still entirely unable to reproduce this myself

problem with with dream is that outpainting produces weird results. I tried the monalisa and prompted for a painting with a beautiful woman and it gave me 3 headed monalisa.

@Lesteriax were you using the auto HRfix option when using that? that sounds more like the common SD issue with generating images that aren't exactly the dimensions of the training data more than anything else...

@seijihariki seijihariki removed the waiting Waiting for something to be performed by the author label Dec 26, 2022
@seijihariki
Copy link
Collaborator

Hi, @Rogal80. Sorry for the late response. Can you send us a screenshot of the result of running the following W3Schools example on your firefox browser:

https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_canvas_globalcompop_all

This is the expected result:
image

@rivermonster
Copy link

Switching to Chrome solved the same issue for me that I was getting in Firefox.

@zero01101
Copy link
Owner

zero01101 commented Dec 29, 2022

i almost exclusively use firefox and honestly can't get this to happen for the life of me; even gone as far as manually installing the NSFW check extension to see if maybe that was inadvertently getting triggered or something but no luck...

@Rogal80 and @rivermonster, are either of you using any firefox addons? it seems that the microsoft editor extension for chrome gets into fights with the overmask slider which is genuinely an incompatibility i can say i could never have predicted... also, along with the canvas GCO test @seijihariki mentioned, could i possibly ask if you'd mind trying (preferably both) the webUI extension, and/or just standalone openOutpaint in a firefox troubleshooting state and seeing if that makes a difference?

@rivermonster
Copy link

rivermonster commented Dec 30, 2022

UPDATE: Further testing got it to repeat the error with DuckDuckGo Privacy alone and make the error go away by disabling it (without restarting the whole automatic interface with a shutdown and restart). So it very likely may be just the DuckDuckGo Privacy

Got it!

Figured it out, it's a two variable problem so it was annoying to isolate it. The issue TRIGGERED for me is experienced ONLY when BOTH of the follow are TRUE:

  1. The extension DuckDuckGo Privacy Essentials is active
  2. The theme is set to Dark space - The Best Dynamic Theme
    Once this is the case then only by turning off both and reloading the webui can I get things working properly again.

Hope this helps replicate and narrow it down!

edit:

Until the theme was turned on it even worked with DuckDuckGo Privacy. There's some weird interaction between the dynamic theme and that extension (I'm guessing, but haven't proven conclusively).

@zero01101
Copy link
Owner

FASCINATING

will see if i can confirm

@zero01101
Copy link
Owner

image

added duckduckgo privacy addon, left default settings, simply tried to outpaint and... yep, busted

thank you greatly for your findings

@zero01101
Copy link
Owner

confirmed on openOutpaint standalone as well, and obnoxiously the GCO test showed nothing out of the ordinary at all
image

@zero01101
Copy link
Owner

zero01101 commented Dec 30, 2022

it says that "privacy protections aren't available for special pages or local pages" in the option menu, but if i manually add localhost to the unprotected sites list, outpainting works again - @rivermonster could you try that? may need to add 127.0.0.1 (or whatever host your A1111 webUI is served from) instead, depending on how you access it
image

@rivermonster
Copy link

@zero01101 Can confirm that adding 127.0.0.1 to the unprotected sites list fixed the issue and allowed the extension to remain enabled.

Also, thanks so much for this extension. You guys really are my heroes!

@zero01101
Copy link
Owner

aww :3 just glad to figure it out lol, was driving me absolutely batty :D

added mentions to the readmes, will update docs eventually

@zero01101
Copy link
Owner

@Rogal80 any chance you could test this out, assuming you're using the duckduckgo extension as well?

@zero01101 zero01101 added external There is some external dependency for this issue eval Waiting for evaluation of a solution labels Dec 30, 2022
@Rogal80
Copy link
Author

Rogal80 commented Dec 30, 2022

Hi, sorry for late response,
image
I am also using Firefox extension:
— language tool
— dark reader, but it's off on webui
— easy YouTube video downloader
— DuckDuckGo
— Search by Image

@Rogal80
Copy link
Author

Rogal80 commented Dec 30, 2022

Ok, found it, it's dark reader causing issue – disabling it for whole Firefox it's fixing outpaint

  • even without duckduckgo when dark reader is on all images are black

@seijihariki
Copy link
Collaborator

Okay, thank you for your report! Added some instructions on the README for debugging extension issues the next time something is very weird, like in this issue.

@seijihariki
Copy link
Collaborator

Will be closing this issue now.

@fhnb16
Copy link

fhnb16 commented Jan 28, 2023

Get this issue in Edge (chromium) and Firefox without any extentions, img2img produce blank black image(

@zero01101
Copy link
Owner

@fhnb16 the img2img tool will result in black pixels when used over empty/transparent space unlike the dream tool, is that what you're referencing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working eval Waiting for evaluation of a solution external There is some external dependency for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants