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

[Bug]: SD generates black images if ran too long

Open AlizerUncaged opened this issue 2 years ago • 4 comments

Is there an existing issue for this?

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

What happened?

I've been generating images on my GTX 1070 card for about a day when it starts to generate black images if left too long, I generate 512x640 images, low cfg and steps and I start to generate around 4AM, later at night or midnight it just generates nothing but black boxes and I have to restart my PC in order for it to generate normal images

Steps to reproduce the problem

just keep generating images for the entire day

What should have happened?

it should generate normal images

Commit where the problem happens

7ec275fae799f19cdb1756412ae75ca6bfe251cd

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Microsoft Edge

Command Line Arguments

none

Additional information, context and logs

i run gtx 1070 and pfg model

AlizerUncaged avatar Jan 13 '23 16:01 AlizerUncaged

I think its the memory leak ,here on my pc it generates black images wwhenver i use anything3 vae with higher resolutions which means its probably out of memory but that didnt happened with this webui from 2 weeks ago, probably recently some dev was not careful with memory optimisations and broke it then it got pulled Also it might be new dependencies that were added recently, im getting black screen when i do 640x768 on 11gb 1080ti but 2 weeks ago i could do full 2048x2048, i think its a major issue that should be adressed with a priority Anyway, im going to degrade to first january version

2blackbar avatar Jan 14 '23 02:01 2blackbar

@2blackbar yeah exactly what I was thinking, the problem is fixed by adding -precision full --no-half on the command line args but on the older versions of this webui this didnt happen to me, might be a problem when sd was updated to 2.0? not really sure but i have to lower my img2img resolution now to prevent black images, or again, restarting my pc to refresh everything

AlizerUncaged avatar Jan 14 '23 08:01 AlizerUncaged

isnt those arguments slowing down generations tho? thats not a fix, its a cripple workaround and the bug is still there, there should be a better way to communicate out of memory than wasting gpu time and power to produce black image, you wait a minute for high res image and al you get is black... it did not happened with older versions, too many guys are doing git pull requests without checking their code, various programming skills with various devs

2blackbar avatar Jan 14 '23 21:01 2blackbar

There is also a memory leak when using DPM++SDE Karras as well. But that looks like its an issue with the K-diffusion repo. https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/6678#issue-1531123293

askmyteapot avatar Jan 15 '23 03:01 askmyteapot

Closing as stale.

catboxanon avatar Aug 03 '23 19:08 catboxanon