Open baryluk opened 1 year ago
do a cd to your shark directory and then pip install torchvision its no longer throwing the tv error for me however (i) now get cannot import name 'DPMSolverMultistepScheduler' from 'diffusers' (C:\Users\AppData\Local\Programs\Python\Python39\lib\site-packages\diffusers__init__.py)
What is the output of diffusers-cli env
I just had same issue. Fresh, first-time install on Kubuntu 22.10
$ python index.py
Traceback (most recent call last):
File "/home/user/SHARK/web/index.py", line 5, in <module>
from models.stable_diffusion.main import stable_diff_inf
File "/home/user/SHARK/web/models/stable_diffusion/main.py", line 4, in <module>
import torchvision.transforms as T
ModuleNotFoundError: No module named 'torchvision'
(shark.venv) pc:~/SHARK/web$ cd ..
(shark.venv) pc:~/SHARK$ pip install torchvision
Collecting torchvision
It finally threw an error:
Attempting uninstall: torch
Found existing installation: torch 2.0.0.dev20221221+cpu
Uninstalling torch-2.0.0.dev20221221+cpu:
Successfully uninstalled torch-2.0.0.dev20221221+cpu
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torch-mlir 20221222.695 requires torch==2.0.0.dev20221221, but you have torch 1.13.1 which is incompatible.
However, when retrying $ python index.py
it did work regardless. So, successful despite error.
$ diffusers-cli env
:
diffusers
version: 0.11.1I was able to get the webui to run with torchvision installed via:
$ pip install --pre torchvision --extra-index-url https://download.pytorch.org/whl/nightly/cpu
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/nightly/cpu
Collecting torchvision
Downloading https://download.pytorch.org/whl/nightly/cpu/torchvision-0.15.0.dev20221226%2Bcpu-cp310-cp310-linux_x86_64.whl (1.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 3.9 MB/s eta 0:00:00
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in ./shark.venv/lib/python3.10/site-packages (from torchvision) (9.3.0)
Requirement already satisfied: torch in ./shark.venv/lib/python3.10/site-packages (from torchvision) (2.0.0.dev20221222+cpu)
Requirement already satisfied: requests in ./shark.venv/lib/python3.10/site-packages (from torchvision) (2.28.1)
Requirement already satisfied: numpy in ./shark.venv/lib/python3.10/site-packages (from torchvision) (1.24.1)
Requirement already satisfied: typing-extensions in ./shark.venv/lib/python3.10/site-packages (from torchvision) (4.4.0)
Requirement already satisfied: idna<4,>=2.5 in ./shark.venv/lib/python3.10/site-packages (from requests->torchvision) (3.4)
Requirement already satisfied: charset-normalizer<3,>=2 in ./shark.venv/lib/python3.10/site-packages (from requests->torchvision) (2.1.1)
Requirement already satisfied: certifi>=2017.4.17 in ./shark.venv/lib/python3.10/site-packages (from requests->torchvision) (2022.12.7)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./shark.venv/lib/python3.10/site-packages (from requests->torchvision) (1.26.13)
Requirement already satisfied: networkx in ./shark.venv/lib/python3.10/site-packages (from torch->torchvision) (3.0rc1)
Requirement already satisfied: sympy in ./shark.venv/lib/python3.10/site-packages (from torch->torchvision) (1.11.1)
Requirement already satisfied: mpmath>=0.19 in ./shark.venv/lib/python3.10/site-packages (from sympy->torch->torchvision) (1.2.1)
Installing collected packages: torchvision
Successfully installed torchvision-0.15.0.dev20221226+cpu
This nightly version keeps the default torch installed by the setup_venv.sh
script.
The images I'm able to generate are just black, but that's very likely a separate issue.
Same problem for me on Windows10 using a RX6800XT. I was able to manually fix it thanks to @gnusenpai
pip install --pre torchvision --extra-index-url https://download.pytorch.org/whl/nightly/cpu
@ 1595254eab22031d7367c32e1c98c8d7556746ae