Skip to content

same issue, fixed? #16896

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

Open
jeremt001 opened this issue Mar 16, 2025 · 1 comment
Open

same issue, fixed? #16896

jeremt001 opened this issue Mar 16, 2025 · 1 comment

Comments

@jeremt001
Copy link

jeremt001 commented Mar 16, 2025

same issue, fixed?

最初由 Sensanko52123 在 #16882 (comment) 发布

It can be opened now, but it’s not completely working. Currently, I can only open it using the following method:

  1. Open Command Prompt as Administrator (press Win + R, type cmd, and then press Ctrl + Shift + Enter).

  2. Type cd and navigate to the folder where your sd-web-ui is located.

  3. Then type webui-user.bat to launch the program.

I can only open it this way at the moment; clicking directly on the file causes an error.


This is the error log when trying to start directly:

venv "C:\stable-diffusion-webui\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)]

Version: v1.10.1

Commit hash: 82a973c

Couldn't determine Stable Diffusion XL's hash: 45c443b316737a4ab6e40413d7794a7f5657c19f, attempting autofix...

Fetching all contents for Stable Diffusion XL

warning: safe.directory ''C:/Users/jerem/OneDrive/桌面/工具/stable-diffusion-webui/repositories/stable-diffusion-webui-assets'' not absolute

warning: safe.directory ''C:/Users/jerem/OneDrive/桌面/工具/stable-diffusion-webui/repositories/stable-diffusion-webui-assets'' not absolute

warning: safe.directory ''C:/Users/jerem/OneDrive/桌面/工具/stable-diffusion-webui/repositories/stable-diffusion-webui-assets'' not absolute

warning: safe.directory ''C:/Users/jerem/OneDrive/桌面/工具/stable-diffusion-webui/repositories/stable-diffusion-webui-assets'' not absolute

warning: safe.directory ''C:/Users/jerem/OneDrive/桌面/工具/stable-diffusion-webui/repositories/stable-diffusion-webui-assets'' not absolute

fatal: detected dubious ownership in repository at 'C:/stable-diffusion-webui/repositories/generative-models'

'C:/stable-diffusion-webui/repositories/generative-models' is owned by:

BUILTIN/Administrators (S-1-5-32-544)

but the current user is:

DESKTOP-9PK31L6/jerem (S-1-5-21-2914250175-1236065574-3379173521-1001)

To add an exception for this directory, call:

git config --global --add safe.directory C:/stable-diffusion-webui/repositories/generative-models

Traceback (most recent call last):

File "C:\stable-diffusion-webui\launch.py", line 48, in

main()

File "C:\stable-diffusion-webui\launch.py", line 39, in main

prepare_environment()

File "C:\stable-diffusion-webui\modules\launch_utils.py", line 413, in prepare_environment

git_clone(stable_diffusion_xl_repo, repo_dir('generative-models'), "Stable Diffusion XL", stable_diffusion_xl_commit_hash)

File "C:\stable-diffusion-webui\modules\launch_utils.py", line 178, in git_clone

current_hash = run_git(dir, name, 'rev-parse HEAD', None, f"Couldn't determine {name}'s hash: {commithash}", live=False).strip()

File "C:\stable-diffusion-webui\modules\launch_utils.py", line 166, in run_git

git_fix_workspace(dir, name)

File "C:\stable-diffusion-webui\modules\launch_utils.py", line 153, 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 "C:\stable-diffusion-webui\modules\launch_utils.py", line 116, in run

raise RuntimeError("\n".join(error_bits))

RuntimeError: Couldn't fetch Stable Diffusion XL.

Command: "git" -C "C:\stable-diffusion-webui\repositories\generative-models" fetch --refetch --no-auto-gc

Error code: 128

Press any key to continue...

@minhaj3
Copy link

minhaj3 commented Mar 18, 2025

Hey, I am not a contributor here but I think this issue appears to be related to Git safe directory settings and ownership conflicts in Windows.
To fix it, try running:

git config --global --add safe.directory C:/stable-diffusion-webui/repositories/generative-models
If the issue persists, running Command Prompt as Administrator and launching webui-user.bat may help.
Additionally, manually resetting the repo using:

cd C:\stable-diffusion-webui\repositories\generative-models
git fetch --all
git reset --hard origin/main

might resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants