stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: RuntimeError: Couldn't determine Stable Diffusion's hash
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
venv "M:\stable-diffusion-webui\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)]
Commit hash:
Steps to reproduce the problem
- Run webui
What should have happened?
commit hash should exist?
Commit where the problem happens
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
No response
Additional information, context and logs
No response
Did you install by running git clone
or download the source code as zip? If you did not git clone
, this will happen, and you need to do git clone
.
Did you install by running
git clone
or download the source code as zip? If you did notgit clone
, this will happen, and you need to dogit clone
.
I did run git clone, this error is still relevant even following this again.
Did you install by running
git clone
or download the source code as zip? If you did notgit clone
, this will happen, and you need to dogit clone
.I did run git clone, this error is still relevant even following this again.
I meet the same problem now. Did you solve it?
same problem
d:\Den\neuronet>webui-user
From https://github.com/AUTOMATIC1111/stable-diffusion-webui
* branch master -> FETCH_HEAD
Already up to date.
venv "venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: <none>
Cloning Stable Diffusion into repositories\stable-diffusion-stability-ai...
Traceback (most recent call last):
File "d:\Den\neuronet\launch.py", line 361, in <module>
prepare_environment()
File "d:\Den\neuronet\launch.py", line 301, in prepare_environment
git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash)
File "d:\Den\neuronet\launch.py", line 159, in git_clone
run(f'"{git}" clone "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}")
File "d:\Den\neuronet\launch.py", line 105, in run
raise RuntimeError(message)
RuntimeError: Couldn't clone Stable Diffusion.
Command: "git\cmd\git.exe" clone "https://github.com/Stability-AI/stablediffusion.git" "repositories\stable-diffusion-stability-ai"
Error code: 1
stdout: <empty>
stderr: ⥬ 㤠 㪠 .
Cloning into 'repositories\stable-diffusion-stability-ai'...
d:\Den\neuronet>webui-user
From https://github.com/AUTOMATIC1111/stable-diffusion-webui
* branch master -> FETCH_HEAD
Already up to date.
venv "venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: <none>
Traceback (most recent call last):
File "d:\Den\neuronet\launch.py", line 361, in <module>
prepare_environment()
File "d:\Den\neuronet\launch.py", line 301, in prepare_environment
git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash)
File "d:\Den\neuronet\launch.py", line 151, in git_clone
current_hash = run(f'"{git}" -C "{dir}" rev-parse HEAD', None, f"Couldn't determine {name}'s hash: {commithash}").strip()
File "d:\Den\neuronet\launch.py", line 105, in run
raise RuntimeError(message)
RuntimeError: Couldn't determine Stable Diffusion's hash: 47b6b607fdd31875c9279cd2f4f16b92e4ea958e.
Command: "git\cmd\git.exe" -C "repositories\stable-diffusion-stability-ai" rev-parse HEAD
Error code: 1
stdout: fc1488421a2761937b9d54784194157882cbc3b1
stderr: ⥬ 㤠 㪠 .
you not install stable-diffusion-webui conplete (i am chinese not good at english) you can redownload this again waiting like this
[notice] A new release of pip available: 22.2.1 -> 23.0 [notice] To update, run: C:\Users\bob\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip Installing gfpgan Installing clip Installing open_clip Cloning Stable Diffusion into repositories\stable-diffusion-stability-ai... Cloning Taming Transformers into repositories\taming-transformers... Cloning K-diffusion into repositories\k-diffusion... Cloning CodeFormer into repositories\CodeFormer... Cloning BLIP into repositories\BLIP... Installing requirements for CodeFormer Installing requirements for Web UI Launching Web UI with arguments: No module 'xformers'. Proceeding without it. No checkpoints found. When searching for checkpoints, looked at:
- file C:\Users\bob\stable-diffusion-webui\model.ckpt
- directory C:\Users\bob\stable-diffusion-webui\models\Stable-diffusion Can't run without a checkpoint. Find and place a .ckpt or .safetensors file into any of those locations. The program will exit. 请按任意键继续. . .
this i have ever meet this problem now i know i just not complete download this software
git version is too low, upgrade to 2.x
try this https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/1888#issuecomment-1482283828
I meet this problem, and find it's problem with git version.
I have git version 2.39.x
PS D:\stable-diffusion-webui> git -v
git version 2.39.2.windows.1
This git command fail when paste it in cmd
PS D:\stable-diffusion-webui> git -C "D:\stable-diffusion-webui\repositories\stable-diffusion-stability-ai" rev-parse HEAD
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
HEAD
Follow its suggestion, changing this command to the following will succeed
PS D:\stable-diffusion-webui> git rev-parse HEAD -C "D:\stable-diffusion-webui\repositories\stable-diffusion-stability-ai"
14cf434bc36d0ef31f31d4c6cd2bd15d7857d5c8
-C
D:\stable-diffusion-webui\repositories\stable-diffusion-stability-ai
So, the final solution is change D:\stable-diffusion-webui\modules\launch_utils.py
, like this:
git version is too low, upgrade to 2.x works for me, thks!
Install Miniconda
Run Anaconda Prompt(miniconda3) by Administrators
Run webui-user.bat(or .\webui-user.bat)
I meet this problem, and find it's problem with git version.
I have git version 2.39.x
PS D:\stable-diffusion-webui> git -v git version 2.39.2.windows.1
This git command fail when paste it in cmd
PS D:\stable-diffusion-webui> git -C "D:\stable-diffusion-webui\repositories\stable-diffusion-stability-ai" rev-parse HEAD fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' HEAD
Follow its suggestion, changing this command to the following will succeed
PS D:\stable-diffusion-webui> git rev-parse HEAD -C "D:\stable-diffusion-webui\repositories\stable-diffusion-stability-ai" 14cf434bc36d0ef31f31d4c6cd2bd15d7857d5c8 -C D:\stable-diffusion-webui\repositories\stable-diffusion-stability-ai
So, the final solution is change
D:\stable-diffusion-webui\modules\launch_utils.py
, like this:
@heycc This actually helped! Thank you!
This was fixed in https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12526 (and I believe a follow-up commit a bit later). Closing.
When I use it,it says:
fatal: No names found, cannot describe anything.
Python 3.10.6 | packaged by conda-forge | (main, Oct 24 2022, 16:02:16) [MSC v.1916 64 bit (AMD64)]
Version: 1.6.0
Commit hash: e5a634da06c62d72dbdc764b16c65ef3408aa588
Couldn't determine Stable Diffusion's origin URL, attempting autofix...
Fetching all contents for Stable Diffusion
fatal: detected dubious ownership in repository at 'D:/stable-diffusion-webui/repositories/stable-diffusion-stability-ai'
'D:/stable-diffusion-webui/repositories/stable-diffusion-stability-ai' is owned by:
'S-1-5-32-544'
but the current user is:
'S-1-5-21-1266536378-3360291945-600720909-1001'
To add an exception for this directory, call:
git config --global --add safe.directory D:/stable-diffusion-webui/repositories/stable-diffusion-stability-ai
Traceback (most recent call last):
File "D:\stable-diffusion-webui\launch.py", line 48, in <module>
main()
File "D:\stable-diffusion-webui\launch.py", line 39, in main
prepare_environment()
File "D:\stable-diffusion-webui\modules\launch_utils.py", line 384, in prepare_environment
git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash)
File "D:\stable-diffusion-webui\modules\launch_utils.py", line 176, in git_clone
if run_git(dir, name, 'config --get remote.origin.url', None, f"Couldn't determine {name}'s origin URL", live=False).strip() != url:
File "D:\stable-diffusion-webui\modules\launch_utils.py", line 160, in run_git
git_fix_workspace(dir, name)
File "D:\stable-diffusion-webui\modules\launch_utils.py", line 147, in git_fix_workspace
run(f'"{git}" -C "{dir}" fetch --refetch --no-auto-gc', f"Fetching all contents for {name}", f"Couldn't fetch {name}", live=True)
File "D:\stable-diffusion-webui\modules\launch_utils.py", line 115, in run
raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't fetch Stable Diffusion.
Command: "git" -C "D:\stable-diffusion-webui\repositories\stable-diffusion-stability-ai" fetch --refetch --no-auto-gc
Error code: 128