stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: unable to launch webui.bat after the update at 2022/10/31 night
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
CMD ERROR information
File "D:\novelai-webui-10-9update\modules\extensions.py", line 5, in
Steps to reproduce the problem
- Go to ....launch webui.bat after the update
2.luanch failed and the latest information is next:
File "D:\novelai-webui-10-9update\modules\extensions.py", line 5, in
import git ModuleNotFoundError: No module named 'git' 3.I have reinstalled the Git for windows,but it doesn't work
What should have happened?
Successfully launch stable-diffusion
Commit where the problem happens
910a097ae2ed78a62101951f1b87137f9e1baaea
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Microsoft Edge
Command Line Arguments
No response
Additional information, context and logs
No response
The last two recent commits have broken something use git checkout 9b384df to go back to the previous working commit and then git checkout master when the issue is fixed.
This may be fixed, try.
git checkout master
git pull
(web-ui) ➜ stable-diffusion-webui git:(master) ✗ /Users/bamboozle/stable-diffusion-webui/run_webui_mac.sh
WARNING: overwriting environment variables set in the machine
overwriting variable {'PYTORCH_ENABLE_MPS_FALLBACK'}
To make your changes take effect please reactivate your environment
WARNING: overwriting environment variables set in the machine
overwriting variable {'PYTORCH_ENABLE_MPS_FALLBACK'}
Already up to date.
WARNING:root:Pytorch pre-release version 1.13.0.dev20220922 - assuming intent to test it
Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled
Traceback (most recent call last):
File "/Users/bamboozle/stable-diffusion-webui/webui.py", line 12, in <module>
from modules import devices, sd_samplers, upscaler, extensions
File "/Users/bamboozle/stable-diffusion-webui/modules/extensions.py", line 5, in <module>
import git
ModuleNotFoundError: No module named 'git'
(web-ui) ➜ stable-diffusion-webui git:(master) ✗
git checkout 9b384df
this worked for me
Probably caused by https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/f17769cfbc3b2f455a1c3df8a91c2f55820fe4ad - have you tried running pip install?
jet@Jet-MacBook-Pro ~ % cd stable-diffusion-webui && ./run_webui_mac.sh --disable-safe-unpickle --no-half-vae --autolaunch
To make your changes take effect please reactivate your environment
WARNING: overwriting environment variables set in the machine
overwriting variable PYTORCH_ENABLE_MPS_FALLBACK
error: cannot pull with rebase: You have unstaged changes.
error: please commit or stash them.
Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled
Traceback (most recent call last):
File "/Users/jet/stable-diffusion-webui/webui.py", line 12, in <module>
from modules import devices, sd_samplers, upscaler, extensions
File "/Users/jet/stable-diffusion-webui/modules/extensions.py", line 5, in <module>
import git
ModuleNotFoundError: No module named 'git'
Having same issue after last pull (and re-trying minutes ago) and pip3 installing didn't fix –– rolled back with 'git checkout 9b384df' and good to go for now. So latest definitely broke, using Auto on Mac. Thanks to all for the help.
The problem was solved at 2022\11\1 7:00 after using ''git pull''command,Thank you all for your help
yes,it worked for me ,too.
This issue is not fixed on the latest Mac version
Traceback (most recent call last):
File "/Users/username/Documents/stable-diffusion-webui/webui.py", line 12, in
This issue is not fixed on the latest Mac version
Traceback (most recent call last): File "/Users/username/Documents/stable-diffusion-webui/webui.py", line 12, in from modules import devices, sd_samplers, upscaler, extensions File "/Users/username/Documents/stable-diffusion-webui/modules/extensions.py", line 5, in import git ModuleNotFoundError: No module named 'git'
Yes it is still broken on macOS.
Can confirm – this is still broken on Mac...but was closed? Or merged to another issue?
Can confirm – this is still broken on Mac...but was closed? Or merged to another issue?
My bad, just got informed that macOS still has an ongoing problem. Thought the issue was completed
I ran pip install -r requirements.txt which seemed to install and resolve the missing dependencies
I ran
pip install -r requirements.txtwhich seemed to install and resolve the missing dependencies
The problem of ModuleNotFoundError: No module named 'git' remains.
This is still a problem on my Mac. Stable Diffusion is still working, but it is no longer installing daily updates.
Last login: Mon Nov 7 09:55:51 on ttys000
(base) ➜ stable-diffusion-webui git:(master) ✗ conda activate web-ui
WARNING: overwriting environment variables set in the machine
overwriting variable {'PYTORCH_ENABLE_MPS_FALLBACK'}
(web-ui) ➜ stable-diffusion-webui git:(master) ✗ git checkout 9b384df
Note: switching to '9b384df'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 9b384df Merge pull request #4051 from 36DB/kr-localization
(web-ui) ➜ stable-diffusion-webui git:(9b384df) ✗ /Users/bamboozle/stable-diffusion-webui/run_webui_mac.sh
WARNING: overwriting environment variables set in the machine
overwriting variable {'PYTORCH_ENABLE_MPS_FALLBACK'}
To make your changes take effect please reactivate your environment
WARNING: overwriting environment variables set in the machine
overwriting variable {'PYTORCH_ENABLE_MPS_FALLBACK'}
You are not currently on a branch.
Please specify which branch you want to rebase against.
See git-pull(1) for details.
git pull <remote> <branch>
Traceback (most recent call last):
File "/Users/bamboozle/stable-diffusion-webui/webui.py", line 12, in <module>
from modules import devices, sd_samplers, upscaler
File "/Users/bamboozle/stable-diffusion-webui/modules/sd_samplers.py", line 7, in <module>
import k_diffusion.sampling
File "/Users/bamboozle/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/__init__.py", line 1, in <module>
from . import augmentation, config, evaluation, external, gns, layers, models, sampling, utils
File "/Users/bamboozle/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/evaluation.py", line 5, in <module>
from cleanfid.inception_torchscript import InceptionV3W
ModuleNotFoundError: No module named 'cleanfid'
(web-ui) ➜ stable-diffusion-webui git:(9b384df) ✗ pip install -r requirements.txt
Requirement already satisfied: basicsr in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (1.4.2)
Collecting diffusers
Using cached diffusers-0.7.2-py3-none-any.whl (304 kB)
Collecting fairscale==0.4.4
Using cached fairscale-0.4.4.tar.gz (235 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Collecting fonts
Using cached fonts-0.0.3-py3-none-any.whl (4.2 kB)
Collecting font-roboto
Using cached font_roboto-0.0.1-py3-none-any.whl
Requirement already satisfied: gfpgan in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from -r requirements.txt (line 6)) (1.3.5)
Collecting gradio==3.5
Using cached gradio-3.5-py3-none-any.whl (5.3 MB)
Collecting invisible-watermark
Using cached invisible_watermark-0.1.5-py3-none-any.whl (1.6 MB)
Requirement already satisfied: numpy in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from -r requirements.txt (line 9)) (1.23.4)
Collecting omegaconf
Using cached omegaconf-2.2.3-py3-none-any.whl (79 kB)
Requirement already satisfied: opencv-python in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from -r requirements.txt (line 11)) (4.6.0.66)
Requirement already satisfied: requests in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from -r requirements.txt (line 12)) (2.28.1)
Collecting piexif
Using cached piexif-1.1.3-py2.py3-none-any.whl (20 kB)
Requirement already satisfied: Pillow in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from -r requirements.txt (line 14)) (9.3.0)
Collecting pytorch_lightning
Using cached pytorch_lightning-1.8.0.post1-py3-none-any.whl (796 kB)
Collecting realesrgan
Using cached realesrgan-0.3.0-py3-none-any.whl (26 kB)
Requirement already satisfied: scikit-image>=0.19 in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from -r requirements.txt (line 17)) (0.19.3)
Collecting timm==0.4.12
Using cached timm-0.4.12-py3-none-any.whl (376 kB)
Collecting transformers==4.19.2
Using cached transformers-4.19.2-py3-none-any.whl (4.2 MB)
Requirement already satisfied: torch in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from -r requirements.txt (line 20)) (1.12.1)
Requirement already satisfied: einops in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from -r requirements.txt (line 21)) (0.5.0)
Requirement already satisfied: jsonmerge in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from -r requirements.txt (line 22)) (1.9.0)
Collecting clean-fid
Using cached clean_fid-0.1.34-py3-none-any.whl (26 kB)
Collecting resize-right
Using cached resize_right-0.0.2-py3-none-any.whl (8.9 kB)
Collecting torchdiffeq
Using cached torchdiffeq-0.2.3-py3-none-any.whl (31 kB)
Collecting kornia
Using cached kornia-0.6.8-py2.py3-none-any.whl (551 kB)
Collecting lark
Using cached lark-1.1.4-py3-none-any.whl (107 kB)
Collecting inflection
Using cached inflection-0.5.1-py2.py3-none-any.whl (9.5 kB)
Collecting uvicorn
Using cached uvicorn-0.19.0-py3-none-any.whl (56 kB)
Collecting aiohttp
Using cached aiohttp-3.8.3-cp310-cp310-macosx_11_0_arm64.whl (336 kB)
Collecting h11<0.13,>=0.11
Using cached h11-0.12.0-py3-none-any.whl (54 kB)
Requirement already satisfied: fastapi in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from gradio==3.5->-r requirements.txt (line 7)) (0.86.0)
Collecting pycryptodome
Using cached pycryptodome-3.15.0-cp35-abi3-macosx_11_0_arm64.whl
Collecting paramiko
Using cached paramiko-2.12.0-py2.py3-none-any.whl (213 kB)
Requirement already satisfied: pyyaml in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from gradio==3.5->-r requirements.txt (line 7)) (6.0)
Collecting fsspec
Using cached fsspec-2022.10.0-py3-none-any.whl (138 kB)
Collecting pydub
Using cached pydub-0.25.1-py2.py3-none-any.whl (32 kB)
Collecting orjson
Using cached orjson-3.8.1-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (490 kB)
Collecting python-multipart
Using cached python_multipart-0.0.5-py3-none-any.whl
Collecting httpx
Using cached httpx-0.23.0-py3-none-any.whl (84 kB)
Collecting markdown-it-py[linkify,plugins]
Using cached markdown_it_py-2.1.0-py3-none-any.whl (84 kB)
Collecting websockets
Using cached websockets-10.4-cp310-cp310-macosx_11_0_arm64.whl (97 kB)
Collecting ffmpy
Using cached ffmpy-0.3.0-py3-none-any.whl
Collecting pandas
Using cached pandas-1.5.1-cp310-cp310-macosx_11_0_arm64.whl (10.8 MB)
Requirement already satisfied: matplotlib in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from gradio==3.5->-r requirements.txt (line 7)) (3.6.2)
Requirement already satisfied: pydantic in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from gradio==3.5->-r requirements.txt (line 7)) (1.10.2)
Collecting jinja2
Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Requirement already satisfied: torchvision in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from timm==0.4.12->-r requirements.txt (line 18)) (0.13.1)
Requirement already satisfied: packaging>=20.0 in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from transformers==4.19.2->-r requirements.txt (line 19)) (21.3)
Collecting tokenizers!=0.11.3,<0.13,>=0.11.1
Using cached tokenizers-0.12.1.tar.gz (220 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: filelock in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from transformers==4.19.2->-r requirements.txt (line 19)) (3.8.0)
Requirement already satisfied: regex!=2019.12.17 in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from transformers==4.19.2->-r requirements.txt (line 19)) (2022.10.31)
Requirement already satisfied: tqdm>=4.27 in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from transformers==4.19.2->-r requirements.txt (line 19)) (4.64.1)
Collecting huggingface-hub<1.0,>=0.1.0
Using cached huggingface_hub-0.10.1-py3-none-any.whl (163 kB)
Requirement already satisfied: addict in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from basicsr->-r requirements.txt (line 1)) (2.4.0)
Requirement already satisfied: lmdb in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from basicsr->-r requirements.txt (line 1)) (1.3.0)
Requirement already satisfied: scipy in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from basicsr->-r requirements.txt (line 1)) (1.9.3)
Requirement already satisfied: tb-nightly in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from basicsr->-r requirements.txt (line 1)) (2.11.0a20221106)
Requirement already satisfied: yapf in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from basicsr->-r requirements.txt (line 1)) (0.32.0)
Requirement already satisfied: future in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from basicsr->-r requirements.txt (line 1)) (0.18.2)
Collecting importlib-metadata
Using cached importlib_metadata-5.0.0-py3-none-any.whl (21 kB)
Requirement already satisfied: facexlib>=0.2.5 in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from gfpgan->-r requirements.txt (line 6)) (0.2.5)
Requirement already satisfied: PyWavelets>=1.1.1 in /Users/bamboozle/opt/miniconda3/envs/web-ui/lib/python3.10/site-packages (from invisible-watermark->-r requirements.txt (line 8)) (1.4.1)
Collecting onnx
Using cached onnx-1.12.0.tar.gz (10.1 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
fatal: not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/__/tfsdq2q93k7dzm412zrlpbvh0000gn/T/pip-install-kg1m7l9o/onnx_619393f82c4841d0aa20a96472d5c8ae/setup.py", line 81, in <module>
assert CMAKE, "Could not find cmake executable!"
AssertionError: Could not find cmake executable!
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
(web-ui) ➜ stable-diffusion-webui git:(9b384df) ✗ /Users/bamboozle/stable-diffusion-webui/run_webui_mac.sh
WARNING: overwriting environment variables set in the machine
overwriting variable {'PYTORCH_ENABLE_MPS_FALLBACK'}
To make your changes take effect please reactivate your environment
WARNING: overwriting environment variables set in the machine
overwriting variable {'PYTORCH_ENABLE_MPS_FALLBACK'}
You are not currently on a branch.
Please specify which branch you want to rebase against.
See git-pull(1) for details.
git pull <remote> <branch>
Traceback (most recent call last):
File "/Users/bamboozle/stable-diffusion-webui/webui.py", line 12, in <module>
from modules import devices, sd_samplers, upscaler
File "/Users/bamboozle/stable-diffusion-webui/modules/sd_samplers.py", line 7, in <module>
import k_diffusion.sampling
File "/Users/bamboozle/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/__init__.py", line 1, in <module>
from . import augmentation, config, evaluation, external, gns, layers, models, sampling, utils
File "/Users/bamboozle/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/evaluation.py", line 5, in <module>
from cleanfid.inception_torchscript import InceptionV3W
ModuleNotFoundError: No module named 'cleanfid'
(web-ui) ➜ stable-diffusion-webui git:(9b384df) ✗
Seems now pip install -r requirements.txt works for solving the issue.
Still not working for me.
(base) Computer:stable-diffusion-webui username$ ./run_webui_mac.sh To make your changes take effect please reactivate your environment WARNING: overwriting environment variables set in the machine overwriting variable {'PYTORCH_ENABLE_MPS_FALLBACK'} Bereits aktuell. Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled Traceback (most recent call last): File "/Users/username/Documents/stable-diffusion-webui/webui.py", line 13, in <module> from modules import devices, sd_samplers, upscaler, extensions, localization File "/Users/username/Documents/stable-diffusion-webui/modules/extensions.py", line 5, in <module> import git ModuleNotFoundError: No module named 'git'
This fixed it for me:
https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/4109#issuecomment-1298711749
@Stisplit While that comment from the other thread will fix that specific issue, it's pretty fragile and highly likely that you will run into more similar issues in future because of it.
This is the better/more sustainable fix:
You can modify your
run_webui_mac.shto add a line that tries to install the required dependencies withpip install -r requirements.txteach time it starts, after it pulls the latest code. This would probably make a sensible default, and is fairly quick to run, so it might be worth someone telling the original author to include it in their setup script to avoid this sort of error for end users in future:Here is what mine looks like:
#!/usr/bin/env bash -l pyenv local anaconda3-2022.05 # This should not be needed since it's configured during installation, but might as well have it here. conda env config vars set PYTORCH_ENABLE_MPS_FALLBACK=1 # Activate conda environment conda activate web-ui # Pull the latest changes from the repo git pull --rebase + # Update the dependencies if needed + pip install -r requirements.txt # Run the web ui python webui.py --deepdanbooru --precision full --no-half --use-cpu Interrogate GFPGAN CodeFormer $@ # Deactivate conda environment conda deactivateOriginally posted by @0xdevalias in https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/4109#issuecomment-1304747007
For the others who said that pip install -r requirements.txt didn't work for them, or finding that despite pip installing the individual requirements they still don't seem to 'be there', it might be an issue with your conda environment, and which pip is being used. Sometimes the version you're calling doesn't actually install the packages to the correct place, and so they can't be found later.
I have a new theory for you, based on this StackOverflow:
- https://stackoverflow.com/questions/41060382/using-pip-to-install-packages-to-anaconda-environment
What do you see when you activate your conda environment, then run
which -a pip?If it's only something like:
/opt/conda/bin/pipAnd not something like:
/opt/conda/envs/web-ui/bin/pip /opt/conda/bin/pipThen you can likely fix it by either doing a
conda install pipthen usingpipas normal, or usingpython -m pip install FOOinstead of usingpipdirectly.Originally posted by @0xdevalias in https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/4109#issuecomment-1308357941
I did a
conda install pipand then usedpython -m, it looked like it wasn't going to work but then I changed my run script a tiny bit,Curious, what made you think it wasn't going to work? And what was the specific change to the run script that made it work for you? Was it using
requirements_versions.txtrather thanrequirements.txt?python -m pip install -r requirements_versions.txtOriginally posted by @0xdevalias in https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/4109#issuecomment-1309356932
Hopefully the above helps people who are still running into this issue 🖤
Closing as stale.