stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: no 'git' module
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
tart_webui()
File "D:\unstable-diffusion-webui\launch.py", line 200, in start_webui
import webui
File "D:\unstable-diffusion-webui\webui.py", line 14, in
Steps to reproduce the problem
update web ui
What should have happened?
web ui should started
Commit where the problem happens
newest
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
--allow-code --gradio-img2img-tool color-sketch --max-batch-count=100 --ui-config-file=ui-config.json --no-half-vae --vae-path=models/Stable-diffusion/Breast-Expansion/hyper_vae.pt --deepdanbooru
Additional information, context and logs
venv "D:\unstable-diffusion-webui\venv\Scripts\python.exe"
Python 3.10.3 (tags/v3.10.3:a342a49, Mar 16 2022, 13:07:40) [MSC v.1929 64 bit (AMD64)]
Commit hash: 6e4196dc0829bd8fc17028078ae2ab25d7f00244
Installing requirements for Web UI
Launching Web UI with arguments: --allow-code --gradio-img2img-tool color-sketch --max-batch-count=100 --ui-config-file=ui-config.json --no-half-vae --vae-path=models/Stable-diffusion/Breast-Expansion/hyper_vae.pt --deepdanbooru
Traceback (most recent call last):
File "D:\unstable-diffusion-webui\launch.py", line 206, in
@Liso7150 You seem to be confused with the way to use this program. To Install: right-click in a folder / file location of your choice, select open in terminal.
run git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
put your .ckpt file in the models folder
The re-install should help fix the situation
Also, you have git installed?
It's a new requirement that was added recently
fix:
pip install GitPython
It's a new requirement that was added recently fix:
pip install GitPython
This helps but should be added to conda requirements (at least for mac it isnt there)
This is the 'proper' and more sustainable way to fix any missing dependency issues:
You can modify your
run_webui_mac.sh
to add a line that tries to install the required dependencies withpip install -r requirements.txt
each 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 deactivate
Originally 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 despitepip install
ing the individual requirements they still don't seem to 'be there', it might be an issue with yourconda
environment, and whichpip
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/pip
And not something like:
/opt/conda/envs/web-ui/bin/pip /opt/conda/bin/pip
Then you can likely fix it by either doing a
conda install pip
then usingpip
as normal, or usingpython -m pip install FOO
instead of usingpip
directly.Originally posted by @0xdevalias in https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/4109#issuecomment-1308357941
I did a
conda install pip
and 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.txt
rather thanrequirements.txt
?python -m pip install -r requirements_versions.txt
Originally 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 🖤
Originally posted by @0xdevalias in https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/4061#issuecomment-1314398808