stable-diffusion-webui
stable-diffusion-webui copied to clipboard
issue with installing torch and torchvision
I have tried reinstalling python, git, and deleted the repository and started fresh multiple times. Every time I am recieved by the same infinite loading. The last thing my command prompt displays is "Installing torch and torchvision" and after that, nothing changes no matter how long I leave it. I have had to play around with python installs for a while now: Problem 1: wrong version of python/pip was being used and it couldn't install torch as it couldnt grab the correct version. Problem 2: After deleting all instances of python, i had a problem with my python PATH "Fatal Python error: Py_Initialize: unable to load the file system codecModuleNotFoundError: No module named 'encodings'" (the only way I could fix this was to install python on a different drive) Now I am met with my third problem and I have no idea what could be causing it.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Windows 11
- Nvidia RTX 2070 8gb VRAM
- Intel i9 9700k
- 32gb DDR4 RAM

i use my pycharm to get torch and torchvision
but i fail to get gfpgan in the same way

That step can take quite some time without feedback. Disable your antivirus and firewall during installation.
I also encounter the same problem. When I start webui.bat, it will always stay at this step, although I have installed torch in the virtual environment.
You should check CUDA version. This code install pytorch that only support cuda 11.3 version
Same issue. Infinite "installing torch and torchvision". Running on Python 3.10.8, and theoretically I've already installed torch and torchvision with pip
Same. Running Python 3.10.6. Definitely not an issue of not waiting enough time, I've ran it for about an hour just to be sure.
Ok, I've got it, installed and running. The problem is that the script doesn't give any feedback, no echo, nothing, while it's downloading gigabytes of stuff. I simply had to wait for my very slow connection to download everything. I hope the developers will fix this, some feedback could be very useful in this case...
To check if the installation is running, and things are getting downloaded, in the meanwhile, I found useful to see if my internet connection was being used. E.g., on Windows, you can simply see through the system's Task Manager if the Python process is using your network.
I deal with this problem in the following way:
- define the venv path in webui-user.bat, such as 'set VENV_DIR=D:\Anaconda3\envs\torch', this is the path of your conda environment with torch.
- edit 29th line of webui.bat from 'set PYTHON="%~dp0%VENV_DIR%\Scripts\Python.exe"' to ''set PYTHON="%VENV_DIR%\Scripts\Python.exe"
It works on my Win10 OS.
I got this problem on ubuntu 20.04,I use Nvidia 450 driver and cuda 11.0 {defualt by VPS provider),
Then I search CUDA on google and install the latest version (by add apt repo),
After installed,I got this by run nvidia-smi,
NVIDIA-SMI 520.61.05 Driver Version: 520.61.05 CUDA Version: 11.8 ,
Then I run webui.sh again,and use slurm to check it's really start download and install ,it works ,
Current RX Speed: 12418.50 KB/s
After about 5 mins python3 use one of my cpus fully,the script continued and finish.
I'm having issue on AMD 5700xt.
Followed these directions:
I deal with this problem in the following way:
- define the venv path in webui-user.bat, such as 'set VENV_DIR=D:\Anaconda3\envs\torch', this is the path of your conda environment with torch.
- edit 29th line of webui.bat from 'set PYTHON="%~dp0%VENV_DIR%\Scripts\Python.exe"' to ''set PYTHON="%VENV_DIR%\Scripts\Python.exe"
It works on my Win10 OS.
Still same issue.
Error code for webui.bat: stderr: ERROR: Could not find a version that satisfies the requirement torch==1.13.1+cu117 (from versions: none) ERROR: No matching distribution found for torch==1.13.1+cu117
Error code for webui-user.bat: AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
EDIT: I initially had the lastest Python installed, and now also installed 3.9 and set it to PATH. Still same as above.
I'm having issue on AMD 5700xt.
Followed these directions:
I deal with this problem in the following way:
- define the venv path in webui-user.bat, such as 'set VENV_DIR=D:\Anaconda3\envs\torch', this is the path of your conda environment with torch.
- edit 29th line of webui.bat from 'set PYTHON="%~dp0%VENV_DIR%\Scripts\Python.exe"' to ''set PYTHON="%VENV_DIR%\Scripts\Python.exe"
It works on my Win10 OS.
Still same issue.
Error code for webui.bat: stderr: ERROR: Could not find a version that satisfies the requirement torch==1.13.1+cu117 (from versions: none) ERROR: No matching distribution found for torch==1.13.1+cu117
Error code for webui-user.bat: AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
EDIT: I initially had the lastest Python installed, and now also installed 3.9 and set it to PATH. Still same as above.
use this python launch.py --skip-torch-cuda-test
Closing as stale.