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

[Bug]: stable-diffusion got super slow suddenly

Open arad-top-g opened this issue 1 year ago • 8 comments

Is there an existing issue for this?

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

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

arad-top-g avatar Jun 25 '23 04:06 arad-top-g

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

VKY231 avatar Jun 25 '23 19:06 VKY231

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

featherice avatar Jun 25 '23 21:06 featherice

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.

duringleaves avatar Jun 28 '23 18:06 duringleaves

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

chrisdogtn avatar Jun 28 '23 21:06 chrisdogtn

+1

wzgrx avatar Jun 30 '23 05:06 wzgrx

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%

igatsu avatar Jun 30 '23 08:06 igatsu

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

neosign avatar Jul 01 '23 04:07 neosign

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.

PsychoGarlic avatar Jul 02 '23 21:07 PsychoGarlic

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

BautistaBunge avatar Jul 04 '23 22:07 BautistaBunge

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

LabunskyA avatar Jul 05 '23 21:07 LabunskyA

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.

gabsoftware avatar Jul 11 '23 00:07 gabsoftware

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

nooobYoung avatar Jul 11 '23 03:07 nooobYoung

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.

prescience-data avatar Jul 11 '23 09:07 prescience-data

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

yb3794 avatar Aug 03 '23 19:08 yb3794

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.

hobologna avatar Aug 04 '23 09:08 hobologna

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

xGSTQ avatar Aug 04 '23 20:08 xGSTQ

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

dhwz avatar Aug 04 '23 21:08 dhwz

@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

xGSTQ avatar Aug 04 '23 22:08 xGSTQ

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.

Jellybit avatar Aug 13 '23 03:08 Jellybit

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

dhwz avatar Aug 13 '23 08:08 dhwz

@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

hydreonx avatar Aug 13 '23 14:08 hydreonx

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

yb3794 avatar Aug 16 '23 14:08 yb3794

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

catboxanon avatar Aug 16 '23 14:08 catboxanon

@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

tintasur avatar Dec 12 '23 12:12 tintasur

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 avatar Mar 01 '24 03:03 NullinZ

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

you won't ,look at my issue

NullinZ avatar Mar 01 '24 03:03 NullinZ

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

dilectiogames avatar Mar 19 '24 19:03 dilectiogames

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

ayoubachak avatar Mar 31 '24 14:03 ayoubachak