lshqqytiger / stable-diffusion-webui-amdgpu

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

Error raise RuntimeError( RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check ao Instalar #480

Open aleffdaniel opened 4 months ago

aleffdaniel commented 4 months ago

Is there an existing issue for this?

What would your feature do ?

When trying to install Automatic 1111 on my PC, after opening the webui-user.bat file, CMD show the error command " raise RuntimeError( RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check" My GPU is an AMD 570 series 4GB, can anyone help me?

Proposed workflow

  1. Go to ....
  2. Press ....
  3. ...

Additional information

No response

lshqqytiger commented 4 months ago

Launch webui with --use-directml or --use-zluda. AMD GPUs will not be detected automatically as there are several ways to run stable diffusion on AMD GPUs and you should select one.

Etwas1111 commented 4 months ago

how exactly one can launch it with them? do i edit the webui-user.bat file?

knrh8r commented 4 months ago

how exactly one can launch it with them? do i edit the webui-user.bat file?

Either add the flags in webui-user.bat, ex. set COMMANDLINE_ARGS=--use-directml Or create a shortcut to webui.bat, then go into shortcut properties and edit the Target field, ex. path\to\webui.bat --use-directml

Draagoo commented 4 months ago

how exactly one can launch it with them? do i edit the webui-user.bat file?

Either add the flags in webui-user.bat, ex. set COMMANDLINE_ARGS=--use-directml Or create a shortcut to webui.bat, then go into shortcut properties and edit the Target field, ex. path\to\webui.bat --use-directml

I tried this, i just get the error: AttributeError: module 'torch' has no attribute 'dml'

lshqqytiger commented 4 months ago

Remove venv folder and try again.

juliannevela commented 4 months ago

Remove venv folder and try again.

This was what finally worked for me. I am now successfully able to run stable diffusion on my AMD GPU on Windows. :) Thanks!

InfernalSeraph commented 4 months ago

It has been so difficult trying to find complete working instructions to get this running on AMD GPU's. It sure would be appreciated if this was part of the steps for installation. Or if there was maybe a batch for AMD users that guided us through the necessary steps?

It isn't quite clear whether I needed Olive or not, nor which pip package(s) for Olive are actually required. And somewhere suggests adding --skip-torch-cuda-test to the COMMANDLINE_ARGS is supposed to make it work, but that was not the case and I was just stumbling around blindly trying to figure out what unfamiliar settings might be needed to get this to finally successfully generate something.

Regardless, thank you @lshqqytiger for enlightening us.

JosephDavid2 commented 4 months ago

my board is rx 5500 xt and it worked with the set COMMANDLINE_ARGS=----use-zluda

EXYNOS9825 commented 1 month ago

Remove venv folder and try again.

Thanks , solved the problem

LucianoRodriguez0764 commented 3 weeks ago

Remove venv folder and try again.

Thanks! Once in a while I forgot to reset the conda env