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

[Bug]: RuntimeError: Couldn't determine Stable Diffusion's hash #6450

Closed
1 task done
afrofail opened this issue Jan 6, 2023 · 15 comments
Closed
1 task done

[Bug]: RuntimeError: Couldn't determine Stable Diffusion's hash #6450

afrofail opened this issue Jan 6, 2023 · 15 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@afrofail
Copy link

afrofail commented Jan 6, 2023

Is there an existing issue for this?

  • 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:
Traceback (most recent call last):
File "M:\stable-diffusion-webui\stable-diffusion-webui\launch.py", line 306, in
prepare_environment()
File "M:\stable-diffusion-webui\stable-diffusion-webui\launch.py", line 249, in prepare_environment
git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash)
File "M:\stable-diffusion-webui\stable-diffusion-webui\launch.py", line 107, in git_clone
current_hash = run(f'"{git}" -C {dir} rev-parse HEAD', None, f"Couldn't determine {name}'s hash: {commithash}").strip()
File "M:\stable-diffusion-webui\stable-diffusion-webui\launch.py", line 64, in run
raise RuntimeError(message)
RuntimeError: Couldn't determine Stable Diffusion's hash: 47b6b60.
Command: "git" -C repositories\stable-diffusion-stability-ai rev-parse HEAD
Error code: 1
stdout: d55bcd4

Steps to reproduce the problem

  1. 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

@afrofail afrofail added the bug-report Report of a bug, yet to be confirmed label Jan 6, 2023
@afrofail afrofail changed the title [Bug]: [Bug]: RuntimeError: Couldn't determine Stable Diffusion's hash Jan 6, 2023
@aliencaocao
Copy link
Contributor

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.

@afrofail
Copy link
Author

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.

I did run git clone, this error is still relevant even following this again.

@TandK8600
Copy link

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.

I did run git clone, this error is still relevant even following this again.

I meet the same problem now. Did you solve it?

@gduenden
Copy link

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: ⥬  㤠  㪠 .

@Peter-meg
Copy link

you not install stable-diffusion-webui conplete (i am chinese not good at english) you can redownload this again waiting like this

@Peter-meg
Copy link

[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.
    请按任意键继续. . .

@Peter-meg
Copy link

46eb62476d53bb7bbdc102b57eae51a
this i have ever meet this problem now i know i just not complete download this software

@bladexmm
Copy link

git version is too low, upgrade to 2.x

@Promisin
Copy link

try this
#1888 (comment)

@heycc
Copy link

heycc commented Jul 29, 2023

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:
image

@DDUFlyme
Copy link

DDUFlyme commented Aug 1, 2023

git version is too low, upgrade to 2.x
works for me, thks!

@Shihiu-Lin
Copy link

Install Miniconda

Run Anaconda Prompt(miniconda3) by Administrators

Run webui-user.bat(or .\webui-user.bat)

@JohnsonGond
Copy link

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: image

@heycc This actually helped! Thank you!

@catboxanon
Copy link
Collaborator

catboxanon commented Aug 21, 2023

This was fixed in #12526 (and I believe a follow-up commit a bit later). Closing.

@LuZixuan2022
Copy link

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

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