Closed hoodady closed 1 year ago
Looks like your dependencies might have gotten messed up.
Can you got to your Z:\sd\stable-diffusion-webui\venv\Scripts\
folder, run activate.bat
and then pip list
to see what version of torch is installed? Can you also specify what GPU you have
It looks like torch installation broke for some reason. This extension only installs torchaudio, so it shouldn't mess with the rest of already installed torch, but who knows.
You should be able to fix your AUTOMATIC1111 installation by uninstalling torch and related libs while venv is active. Looks like you're on Windows. Open cmd and go to the folder with your installation of Stable Diffusion:
z:
cd Z:\sd\stable-diffusion-webui
venv\Scripts\activate.bat
pip uninstall torch torchvision torchaudio
The next time you run AUTOMATIC1111 it should install the correct version of PyTorch.
Are you perhaps on an AMD GPU and using DirectML version of AUTOMATIC1111 ? Maybe there needs to another installation path for DirectML.
I tried recreating this problem on DirectML version of AUTOMATIC1111, but TorchAudio didn't install at all. SD, didn't break, but obviously extension doesn't work either. It'll be very helpful to know, what GPU you have.
Edit: Riffusion extension installs specific version of TorchAudio, if it's mismatching with Torch lib, Torch will be reinstalled as well. If things go terribly wrong, Torch for different GPU/CPU will be installed. If you have an existing installation of PyTorch, it might be safer to install torch audio manually or manually reinstall PyTorch for your hardware (and OS) and include TorchAudio (https://pytorch.org/get-started/locally/).
Not sure if this will resolve the issue, but I've added a fix that installs the right version of TorchAudio on DirectML version of AUTOMATIC1111. Previously CUDA version was installed and didn't work.
I have deleted the Venv folder, run the st again, and it re-installed it, changed the py code in some are and it works well now! thank man for replying
Torch is not able to use GPU 同样的问题,怎么解决的? MacBook Air M1
Already up to date. venv "Z:\sd\stable-diffusion-webui\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: v1.2.0 Commit hash: b08500cec8a791ef20082628b49b17df833f5dda Traceback (most recent call last): File "Z:\sd\stable-diffusion-webui\launch.py", line 369, in
prepare_environment()
File "Z:\sd\stable-diffusion-webui\launch.py", line 274, in prepare_environment
run_python("import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'")
File "Z:\sd\stable-diffusion-webui\launch.py", line 135, in run_python
return run(f'"{python}" -c "{code}"', desc, errdesc)
File "Z:\sd\stable-diffusion-webui\launch.py", line 111, in run
raise RuntimeError(message)
RuntimeError: Error running command.
Command: "Z:\sd\stable-diffusion-webui\venv\Scripts\python.exe" -c "import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'"
Error code: 1
stdout:
stderr: Traceback (most recent call last):
File "", line 1, in
AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
after installing and restarting the automatic 1111, I run the bat, got errors, decided to delete rifussion extension folder, then I tried running the WebUi and got above error, any clue why?