Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit Hash <none> Couldn't determine Stable Diffusion's hash #2247

Closed
afrofail opened this issue Oct 11, 2022 · 6 comments
Closed

Commit Hash <none> Couldn't determine Stable Diffusion's hash #2247

afrofail opened this issue Oct 11, 2022 · 6 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@afrofail
Copy link

afrofail commented Oct 11, 2022

venv "C:\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.5 (tags/v3.10.5:f377153, Jun 6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)]
Commit hash:
Traceback (most recent call last):
File "C:\stable-diffusion-webui\launch.py", line 164, in
prepare_enviroment()
File "C:\stable-diffusion-webui\launch.py", line 139, in prepare_enviroment
git_clone("https://github.com/CompVis/stable-diffusion.git", repo_dir('stable-diffusion'), "Stable Diffusion", stable_diffusion_commit_hash)
File "C:\stable-diffusion-webui\launch.py", line 74, in git_clone
current_hash = run(f'"{git}" -C {dir} rev-parse HEAD', None, f"Couldn't determine {name}'s hash: {commithash}").strip()
File "C:\stable-diffusion-webui\launch.py", line 32, in run
raise RuntimeError(message)
RuntimeError: Couldn't determine Stable Diffusion's hash: 69ae4b35e0a0f6ee1af8bb9a5d0016ccb27e36dc.
Command: "git" -C repositories\stable-diffusion rev-parse HEAD
Error code: 1
stdout: 69ae4b35e0a0f6ee1af8bb9a5d0016ccb27e36dc

stderr:

Press any key to continue . . .

@afrofail afrofail added the bug-report Report of a bug, yet to be confirmed label Oct 11, 2022
@dfaker
Copy link
Collaborator

dfaker commented Oct 11, 2022

Did we possibly download the zip file and put it there rather than using git to clone the repository?

@afrofail
Copy link
Author

afrofail commented Oct 11, 2022

I have tried both, downloading zip and cloning the repository and still receive this error at what seems like the final step, nothing auto installs in one go, I have to close terminal for each repository and then finally run into this error. It's been two months and I still have not been able to run this. I thought waiting for updates would solve my problem.

Creating venv in directory venv using python "C:\Program Files\Python310\python.exe"
venv "C:\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.5 (tags/v3.10.5:f377153, Jun 6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)]
Commit hash:
Installing torch and torchvision
Traceback (most recent call last):
File "C:\stable-diffusion-webui\launch.py", line 164, in
prepare_enviroment()
File "C:\stable-diffusion-webui\launch.py", line 117, in prepare_enviroment
run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch")
File "C:\stable-diffusion-webui\launch.py", line 32, in run
raise RuntimeError(message)
RuntimeError: Couldn't install torch.
Command: "C:\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
Error code: 1
stdout: Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu113
Collecting torch==1.12.1+cu113
Using cached https://download.pytorch.org/whl/cu113/torch-1.12.1%2Bcu113-cp310-cp310-win_amd64.whl (2143.8 MB)
Collecting torchvision==0.13.1+cu113
Using cached https://download.pytorch.org/whl/cu113/torchvision-0.13.1%2Bcu113-cp310-cp310-win_amd64.whl (4.7 MB)
Collecting typing-extensions
Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting numpy
Using cached numpy-1.23.3-cp310-cp310-win_amd64.whl (14.6 MB)
Collecting requests
Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting pillow!=8.3.*,>=5.3.0
Using cached Pillow-9.2.0-cp310-cp310-win_amd64.whl (3.3 MB)
Collecting idna<4,>=2.5
Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting charset-normalizer<3,>=2
Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2022.9.24-py3-none-any.whl (161 kB)
Installing collected packages: urllib3, typing-extensions, pillow, numpy, idna, charset-normalizer, certifi, torch, requests, torchvision
Successfully installed certifi-2022.9.24 charset-normalizer-2.1.1 idna-3.4 numpy-1.23.3 pillow-9.2.0 requests-2.28.1 torch-1.12.1+cu113 torchvision-0.13.1+cu113 typing-extensions-4.4.0 urllib3-1.26.12

stderr: WARNING: You are using pip version 22.0.4; however, version 22.2.2 is available.
You should consider upgrading via the 'C:\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip' command.

Press any key to continue . . .

@Hyyvez
Copy link

Hyyvez commented Oct 14, 2022

venv "C:\stable-diffusion-webui\venv\Scripts\Python.exe" Python 3.10.5 (tags/v3.10.5:f377153, Jun 6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)] Commit hash: Traceback (most recent call last): File "C:\stable-diffusion-webui\launch.py", line 164, in prepare_enviroment() File "C:\stable-diffusion-webui\launch.py", line 139, in prepare_enviroment git_clone("https://github.com/CompVis/stable-diffusion.git", repo_dir('stable-diffusion'), "Stable Diffusion", stable_diffusion_commit_hash) File "C:\stable-diffusion-webui\launch.py", line 74, in git_clone current_hash = run(f'"{git}" -C {dir} rev-parse HEAD', None, f"Couldn't determine {name}'s hash: {commithash}").strip() File "C:\stable-diffusion-webui\launch.py", line 32, in run raise RuntimeError(message) RuntimeError: Couldn't determine Stable Diffusion's hash: 69ae4b35e0a0f6ee1af8bb9a5d0016ccb27e36dc. Command: "git" -C repositories\stable-diffusion rev-parse HEAD Error code: 1 stdout: 69ae4b35e0a0f6ee1af8bb9a5d0016ccb27e36dc

stderr:

Press any key to continue . . .

I download the zip file and put it on repository fold manually, then I encounter the same error logs but except the last 3 lines different:

Error code: 128
stdout:
stderr: fatal: not a git repository (or any of the parent directories): .git

it works for me after deleting all five hash argument below, (I think it is because if you download the file manually somehow have a different commit hash compared to git_clone, so delete these hash argument to disable the commit hash check)

stable_diffusion_commit_hash = os.environ.get('STABLE_DIFFUSION_COMMIT_HASH', "69ae4b35e0a0f6ee1af8bb9a5d0016ccb27e36dc")
taming_transformers_commit_hash = os.environ.get('TAMING_TRANSFORMERS_COMMIT_HASH', "24268930bf1dce879235a7fddd0b2355b84d7ea6")
k_diffusion_commit_hash = os.environ.get('K_DIFFUSION_COMMIT_HASH', "f4e99857772fc3a126ba886aadf795a332774878")
codeformer_commit_hash = os.environ.get('CODEFORMER_COMMIT_HASH', "c5b4593074ba6214284d6acd5f1719b6c5d739af")
blip_commit_hash = os.environ.get('BLIP_COMMIT_HASH', "48211a1594f1321b00f14c9f7a5b4813144b2fb9")

@mezotaken
Copy link
Collaborator

Reopen or create new issue if the problem is still present.

@mezotaken mezotaken closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2023
@Zhai-Huichen
Copy link

Upgrade ur git to 2.x version.

@mike7user
Copy link

mike7user commented Aug 20, 2023

Try adding directory location that git.exe is into your PATH via environment variables menu.

First press Start menu and search for "Git.exe". Right click and press Open file location.

Then copy the location from the address bar at the top of the File explorer.

Now go back into start menu and Search "variables" and select "Edit System Environment Variables".

select "Environment Variables..."

Then scroll down to PATH and press edit.

Select "New...".

Paste the directory you copy from before into the input box.

Press ok.

This should solve your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

6 participants