stable-diffusion-webui
stable-diffusion-webui copied to clipboard
Nvidia GPU not used!
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
Hi,
I am using this for a couple of weeks but it is slow, my laptop HP Envy 17" comes with 2 GPU (Intel as main and Nvidia MX450 2GB VRAM as High Perf secondary), when SD is running the Nvidia GPU isn't used at all according to task manager... I am using --lowvram flag...
So was anyone able to make the GPU (secondary) work for SD and how? I tried to specify the device via ARGUMENTS, but that didn't work... should I use Docker instead?
Steps to reproduce the problem
1- Modify the .bat file by adding ARGS 2- RUN 3- Write a Prompt 4- Open Task Manager or any GPU usage tool 5- Wait and see that even if the images get generated, the Nvidia GPU is never used.
What should have happened?
GPU should be used with its 2GB VRAM instead of CPU/RAM
Commit where the problem happens
Latest
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Microsoft Edge
Command Line Arguments
set COMMANDLINE_ARGS= --lowvram --precision full --no-half
Additional information, context and logs
No response
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings I think you need to use --device-id
I don't know if that is possible but I do believe the ability to choose / change GPU in a drop-down list would be quite convenient and complementary to the command_args, don't you think ?
Keep in mind that even if you use --device-id, some portions of the code currently ignore it, including Face Restoration and Highres Fix when using DDIM sampler. I posted a bug report here https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/3713 about 2 weeks ago, but it hasn't been fixed yet. So if you start getting errors that mention that all tensors should be on the same GPU and "cuda:0 and cuda:X" that's the reason why.
"the Nvidia GPU isn't used at all according to task manager" was true for my gtx 1080ti as well!
Solution: The problem was task manager itself. Geforce overlay shows 100% GPU usage when task manager shows 0%.
maybe you didn't check the cuda, you checked only 3D. click there and change it to cuda.

Hi,
Thank you for your answer, I wasn't aware that there is a such sub-menu but I am using the latest Windows 11 22H2 and I don't have CUDA in the menus... I will investigate this further, right now I am using Docker to bypass this issue and when I execute a prompt, I see that it uses the GPU and the VRAM get filled...
maybe you didn't check the cuda, you checked only 3D. click there and change it to cuda.
I also checked in my laptop which has similar 2GB VRAM Nvidia Geforce 970M but CUDA is not available in the task manager. I think the reason is that it's a very low-end outdated GPU.
This is how it works in a 970M GPU with 2GB VRAM.
if it doesn't have any cuda option that probably means your cards doesn't support cuda. Most of the Machine learning projects are using CUDA core instead of 3D .
I switched to Docker version and the GPU works
I switched to Docker version and the GPU works
Is docker version faster than this normal version? It's taking too much time to generate a single image.
ìt uses GPU at least so it should be faster, but I didn't do the comparison
Just use HWinfo You'll see CUDA is being used. Task manager is garbage
Closing as stale.
Hello, I have kinda the same problem. If anyone can help, it would be fantastic. I'm using a relatively simple checkpoint on the stable diffusion web UI
My GPU: Nvidia GTX 1660 Super
CPU: i5 9400F
RAM: 32Gb
python: 1.10.6
Windows 10
Task manager says only about 6% of my GPU is being used. How do i get it to properly use my resources so that i can produce images faster? I'm not very good at coding so please be patient with my lack of knowledge on the subject, any help would be great, thank you.