AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: Outdated Installation Instructions for WSL or other error when Installing with WSL #13464

Open lordcasey opened 1 year ago

lordcasey commented 1 year ago

Is there an existing issue for this?

What happened?

after following the instructions in the wiki for installing with WSL I first encounter this error when running "python webui.py" as the instructions say. This error then goes away when I follow this issue: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/13191 , and git clone https://github.com/Stability-AI/generative-models.git in /repositories.

python webui.py Warning: Stable Diffusion XL not found at path /home/user/stable-diffusion-webui/repositories/generative-models/sgm Warning: k_diffusion not found at path /home/user/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/sampling.py Traceback (most recent call last): File "/home/user/stable-diffusion-webui/webui.py", line 13, in initialize.imports() File "/home/user/stable-diffusion-webui/modules/initialize.py", line 30, in imports import sgm.modules.encoders.modules # noqa: F401 ModuleNotFoundError: No module named 'sgm'

Then once I fix that error I get this when trying to run python webui.py: python webui.py no module 'xformers'. Processing without... no module 'xformers'. Processing without... Warning: k_diffusion not found at path /home/user/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/sampling.py Traceback (most recent call last): File "/home/user/stable-diffusion-webui/webui.py", line 13, in initialize.imports() File "/home/user/stable-diffusion-webui/modules/initialize.py", line 33, in imports from modules import shared_init File "/home/user/stable-diffusion-webui/modules/shared_init.py", line 5, in from modules import shared File "/home/user/stable-diffusion-webui/modules/shared.py", line 5, in from modules import shared_cmd_options, shared_gradio_themes, options, shared_items, sd_models_types File "/home/user/stable-diffusion-webui/modules/sd_models_types.py", line 1, in from ldm.models.diffusion.ddpm import LatentDiffusion File "/home/user/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 19, in from pytorch_lightning.utilities.distributed import rank_zero_only ModuleNotFoundError: No module named 'pytorch_lightning.utilities.distributed'

Steps to reproduce the problem

  1. follow instructions on wiki for installing with WSL
  2. run python webui.py

What should have happened?

successful launch of the webui

Sysinfo

RTX 3080 32gb RAM WSL 2, tried with on both Arch linux and ubuntu distributions.

What browsers do you use to access the UI ?

Google Chrome

Console logs

when I run pip install -U numpy  --prefer-binary I also get the pip dependency resolver error but I'm not sure if that's responsible for any of the issues or not.

Requirement already satisfied: numpy in /home/user/anaconda3/envs/automatic/lib/python3.10/site-packages (1.23.5)
Collecting numpy
  Downloading numpy-1.26.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.2/18.2 MB 7.2 MB/s eta 0:00:00
Installing collected packages: numpy
  Attempting uninstall: numpy
    Found existing installation: numpy 1.23.5
    Uninstalling numpy-1.23.5:
      Successfully uninstalled numpy-1.23.5
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.
numba 0.58.0 requires numpy<1.26,>=1.21, but you have numpy 1.26.0 which is incompatible.

Additional information

No response

Hansyvea commented 1 year ago

I met the same problem, following the WSL2 steps. ModuleNotFoundError: No module named 'pytorch_lightning.utilities.distributed' can be solved if you downgrade pytorch_lightning to 1.9.4 as is required in requirements_versions.txt. However, a new problem emerges that ModuleNotFoundError: No module named 'taming'

Lica3265 commented 1 year ago

Have you tried installing CUDA on Windows now? Because I also encountered a similar issue, but following the official documentation and installing CUDA on Windows first resolved the problem.

Hansyvea commented 1 year ago

Have you tried installing CUDA on Windows now? Because I also encountered a similar issue, but following the official documentation and installing CUDA on Windows first resolved the problem.

Do you mean Cuda Toolkit for WSL?

Lica3265 commented 1 year ago

Have you tried installing CUDA on Windows now? Because I also encountered a similar issue, but following the official documentation and installing CUDA on Windows first resolved the problem.

Do you mean Cuda Toolkit for WSL?

https://docs.nvidia.cn/cuda/wsl-user-guide/index.html#getting-started-with-cuda-on-wsl-2

I followed the instructions to install it.

jxnding commented 11 months ago

https://docs.nvidia.cn/cuda/wsl-user-guide/index.html#getting-started-with-cuda-on-wsl-2

I followed the instructions to install it.

This did not work for me. Getting the same error as above (sgm issue, resolved by #13191 followed by more errors). Upon seeing the additional errors, I gave up on that approach of incrementally solving each error, since it means there's something wrong with my installation.