Installing Stable diffusion webui : Torch is not able to use GPU

Hello world !

I’m completely new to python and I’m trying to install Stable Diffusion AI on my computer.

I watched this video : https://www.youtube.com/watch?v=hnJh1tk1DQM

First I Installed python 3.12 but it didn’t worked so I installed Python 3.10.6 not with the embeddable package but with 64-bit normal windows installer and I’m still struggling to make the thing work.

To resume

1.I install python 3.10.6

2.I download the stable diffusion zip and extract it.

  1. I run the webui-user.bat file.

  2. It dos what it does.

  3. I run cmd command on the path bar of the stable diffusion folder

  4. run command pip install opencv-python

  5. write cmd in the windows execute thing to run command py -m pip install --upgrade pip

  6. After I run again the webui-user.bat file. It installs a lot of stuff but i see something is not going well.

  7. run again the webui-user.bat file and it says:

venv "C:\Users\user1\Desktop\stable-diffusion-webui-master\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: 1.6.0
Commit hash: <none>
Traceback (most recent call last):
  File "C:\Users\user1\Desktop\stable-diffusion-webui-master\launch.py", line 48, in <module>
    main()
  File "C:\Users\user1\Desktop\stable-diffusion-webui-master\launch.py", line 39, in main
    prepare_environment()
  File "C:\Users\user1\Desktop\stable-diffusion-webui-master\modules\launch_utils.py", line 356, in prepare_environment
    raise RuntimeError(
RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
Appuyez sur une touche pour continuer...

I will be very grateful if someone can help me solve the problem…
I’m going to try to install it on my laptop.

Thanks in advance for your time

stable diffusion assumes you have an nvidia graphics card.
I think there is a way to use the CPU only, but it will be very slow.

You may find you have more luck using https://easydiffusion.github.io/ that takes the hardwork out of installing and running stable diffusion.

Thx Barry for your answer. I have a Nvidia graphic card but it’s not powerful enough. I manage to install by downloading new drivers but it’s not working. The GPU is too slow. On my laptop with the RTX 4070, it’s fine even if it says sometimes that it uses all the memory… I don’t get it because because the GPU has 8GB memory…? I’m going to look at your link when i come back home.

Stable diffuse can use more 8GiB of ram on the GPU.
There are command line options to limit the memory that will be used, sorry I forget what exactly they are off the top of head.