AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
141.79k stars 26.78k forks source link

[Bug]: stable-diffusion got super slow suddenly #11418

Closed arad-top-g closed 1 year ago

arad-top-g commented 1 year ago

Is there an existing issue for this?

What happened?

i have been using stable diffusion for a month but today suddenly it is super slow , i should say i recently downloaded a midjourney model but i am not using it , and i have 10 different models if hta is relevant to my problem please say so ?

Steps to reproduce the problem

  1. Go to stable diffusion
  2. Press the generate button
  3. it takes so llong

What should have happened?

it should have only taken a few minutes since i have only 20 sampling steps

Commit where the problem happens

when running a prompt

What Python version are you running on ?

None

What platforms do you use to access the UI ?

Windows

What device are you running WebUI on?

Nvidia GPUs (RTX 20 above)

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--xformers --autolaunch --disable-safe-unpickle

List of extensions

sd-webui-openpose-editor | sd-webui-text2video | LDSR |   Lora | ScuNET | SwinIR |  prompt-bracket-checker

Console logs

nothing

Additional information

i have 10 different models if that is relevant i use DPM2 sampling method with CFG 8 and quite a large prompt and negative prompt

VKY231 commented 1 year ago

having same issue here, a week before I could generate images using euler-a sampler in 10sec with 20 steps and cfg 7, now it take 3 whole minutes to generate images, I tried re-installing web-ui, rolled back nvidia driver to v351 the problem persists, using rtx3050 laptop 4gb vram its good enough to generate images after update image generation slowed down drastically no matter which sample or resolution you use

featherice commented 1 year ago

Same. Haven't been using webui for idk 3 days, updated, now everything is extremely slow. -opt-sdp-no-mem-attention --upcast-sampling --no-hashing --always-batch-cond-uncond --medvram

duringleaves commented 1 year ago

I'm seeing this as well. M1 Mac Mini. In the last two or three days, it's slowed down to almost 60 seconds per image at default settings.

chrisdogtn commented 1 year ago

Same here. What used to take 2-3 seconds is taking upwards of 3-4 minutes. All models, all step counts, all samplers.

wzgrx commented 1 year ago

+1

igatsu commented 1 year ago

Same. I even reinstalled Windows 11 and formatted all the disks. Generation goes up to 100 percent and then within 20 seconds does not give results and loads the video card to 100%

neosign commented 1 year ago

+1 same here , just updated the Nvidia studio driver suddenly 4xsharp highres fix super slow. normally it was my fastest Highrest fix

PsychoGarlic commented 1 year ago

Here too. I was having issues with the xyz script, so I decided to reinstall Stable Diffusion. First, I had to reinstall the venv folder a couple of times, until it finally loaded, but image generation is absurdly slow. What usually was taking 4h was now 130h.

BautistaBunge commented 1 year ago

Same problem, the moment I updated it started taking significantly longer to generate

LabunskyA commented 1 year ago

Same. I even reinstalled Windows 11 and formatted all the disks. Generation goes up to 100 percent and then within 20 seconds does not give results and loads the video card to 100%

That is probably due to NVidia drivers update. Now it can use shared VRAM (basically, your ram) while generating large images. 100% load is indicative of your driver copying chunks from VRAM to RAM and vice versa. This is also incredibly slow. Try reverting to 531 or below for consumer GPUs, 529 and below for Pro graphics. But then you'll may encounter OOMs. My tests with RTX A4000 and a few fixed prompts/seeds showed:

  1. 535+ using more VRAM and using a lot of shared memory;
  2. 529 throwing OOMs with no regard to anything;
  3. 531 throwing less OOMs (?, not sure why);
  4. "new features" 531 using shared VRAM, but in way less quantities (I stopped on it for now).

There also could be something in PyTorch / xformers, as both got versions upgrades... The reason it is getting stuck at the 100% mark is due to image reconstruction and by-design, afaik

gabsoftware commented 1 year ago

Also have this issue with my 3080 ti, since I updated to latest SD and latest Nvidia drivers, it takes several minutes to make a simple img2img and almost a minute to generate a 512x512 picture with EulerA 20 steps, before it was about 3 to 5 seconds.

So it is basically unusable now.

nooobYoung commented 1 year ago

Hello, I am also experiencing the same issue. After upgrading the new version yesterday, the speed is 4 times slower than before

my videocard is gtx1650 4GB,can run 2images( 512x768(hir.fix 1024x1536) in 7m 22s) with ddim sampler per a time the speed slowed down when after upgrading.

It should not be a problem with the graphics driver version, because before the upgrade, my graphics driver version was already 531.

I found that during the hir repair phase and hit "generate" button (a long time), and my GPU kept working but without any change in the progress bar, the GPUZ shows that the GPU is limited by idle........,(usually it is power) J9{G0{_KXO_NMW8JQHW3GZV

prescience-data commented 1 year ago

Now it can use shared VRAM (basically, your ram)

This is my suspicion as well - after digging into the performance logging I notice it begins to using shared memory well before the dedicated VRAM is fully utilized.

yb3794 commented 1 year ago

Im Having Same Problem Anyone Know how to fix this.,... ??

ghost commented 1 year ago

I am having this issue after making some changes for SDXL. It's painfully slow, and with 6VRAM I get OOMs anything I try to use multiple extensions lie dynamic thresholding, LORAs, etc. Once I start getting the OOM notifications, it will stop rendering at smaller resolutions and no extensions.

xGSTQ commented 1 year ago

Same problem. I installed SDXL in a separate DIR but that was super slow to generate an image, like 10 minutes... so decided to use SD1.5 as I could previously generate images in 10 seconds, now its taking 1min 20 seconds

Nvidia 3060Ti 8GB

dhwz commented 1 year ago

@xGSTQ note you've to use --medvram on 8GB that's mandatory else it's very slow

xGSTQ commented 1 year ago

@xGSTQ note you've to use --medvram on 8GB that's mandatory else it's very slow

Thanks that fixed it for me :) back to fast image creation! works on SDXL too, seeing images being created in 30 seconds on average. Thank you

Jellybit commented 1 year ago

I just updated today, and I'm experiencing the same thing. It takes much longer to generate a 512x512 image in SD 1.5.

EDIT: I just reverted my Nvidia drivers to version 528, and my old speeds are back. Interesting, because I was sure it was going fast even with the new drivers yesterday.

dhwz commented 1 year ago

@Jellybit you're using the studio or the game ready drivers?

hydreonx commented 1 year ago

@Jellybit you're using the studio or the game ready drivers?

get your drivers from this page https://www.nvidia.com/download/find.aspx

I have a 3060 TI and I got drivers from last month and it fixed my speeds

yb3794 commented 1 year ago

Revert back to 531 seem work for me... but i do hope this Issue is fixed somehow...

catboxanon commented 1 year ago

Duplicate of https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/11063

tintasur commented 10 months ago

@dhwz Thanks!!! this solve it for me, didn't try to reverse my drivers yet (curruentrly on game ready 546.29)

@xGSTQ note you've to use --medvram on 8GB that's mandatory else it's very slow

NullinZ commented 8 months ago

https://nvidia.custhelp.com/app/answers/detail/a_id/5490 the solution is here ,it 's works well for me ,and you won't downgrude your driver

NullinZ commented 8 months ago

Revert back to 531 seem work for me... but i do hope this Issue is fixed somehow...

you won't ,look at my issue

dilectiogames commented 7 months ago

SO I've got this "slow generation on SDXL" today (actually freeze computer and all) It turns out that the mf windows decided to move the paging file from the C drive that is an SSD to a different drive that is a normal disc HDD. Why? Have no idea. It has enough space on the C: SSD drive.

So in short. Check on what drive your paging file is and move it back to an SSD drive. I don't have time now but if anyone needs more details on how to do this post here. You can search google and youtube on how to do it anyway

ayoubachak commented 6 months ago

https://nvidia.custhelp.com/app/answers/detail/a_id/5490 the solution is here ,it 's works well for me ,and you won't downgrude your driver

Thanks, that's all I needed, I'm using Nvidia RTX 2000 Ada with 8GB vRAM