Skip to content

Fix initial launch of AUTOMATIC1111/stable-diffusion-webui env STABLE_DIFFUSION_REPO #1499

@w-e-w

Description

@w-e-w

Package

AUTOMATIC1111/stable-diffusion-webui

When did the issue occur?

Running the Package

What GPU / hardware type are you using?

irrelevant - Windows sandbox without GPU

What happened?

Consider this post as a FYI

HI I am from AUTOMATIC1111/stable-diffusion-webui

Tl;Dr

When first launching AUTOMATIC1111/stable-diffusion-webui, webui will clone https://github.com/Stability-AI/stablediffusion.git, this will fail and prevented webui from launching because the repo has been removed

We have fix this issue on the dev branch by switch the url to a fork https://github.com/w-e-w/stablediffusion.git

but unfortunately we are unable to update the master branch which StabilityMatrix uses
I've already instructions for people on Master branch in my post

for master branch the easiest fix would be to adding Environment variable

Name Value
STABLE_DIFFUSION_REPO https://github.com/w-e-w/stablediffusion.git

webui check if there is a custom URL set by environment variable STABLE_DIFFUSION_REPO before using the default URL

I've already written instructions on my fix post talling StabliltyMatrix user can add the environment variable manually to get webui running
but as this would be required for any new installation, so it is probably better for it to be integrated in the launch sequence of StabliltyMatrix for AUTOMATIC1111/stable-diffusion-webui

notes
I don't personally use this launcher nor have I read its code and so I'm not familiar with it
so I don't know if adding environment variable sequence is appropriate fix for StabilityMatrix
consider my post as a suggestion
I'm here because I got a question asked under the my fix post about how to fix this for StabilityMatrix
from and playing around with the StabilityMatrix for ~5 minutes, I determine that the easiest fix seem to be adding the environment variable, but because of my unfamiliarity with StabilityMatrix I cannot say if this is the best action
if there are better instructions that I can tell the users please let me know

Console output

executed in Windows sandbox

Python 3.10.17 (main, May 30 2025, 05:32:15) [MSC v.1943 64 bit (AMD64)]
Version: v1.10.1
Commit hash: 82a973c04367123ae98bd9abdf80d9eda9b910e2
Cloning assets into C:\Users\WDAGUtilityAccount\Desktop\Data\Packages\stable-diffusion-webui\repositories\stable-diffusion-webui-assets...
Cloning into 'C:\Users\WDAGUtilityAccount\Desktop\Data\Packages\stable-diffusion-webui\repositories\stable-diffusion-webui-assets'...
Cloning Stable Diffusion into C:\Users\WDAGUtilityAccount\Desktop\Data\Packages\stable-diffusion-webui\repositories\stable-diffusion-stability-ai...
Cloning into 'C:\Users\WDAGUtilityAccount\Desktop\Data\Packages\stable-diffusion-webui\repositories\stable-diffusion-stability-ai'...
fatal: User cancelled dialog.
bash: line 1: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No such file or directory
Traceback (most recent call last):
  File "C:\Users\WDAGUtilityAccount\Desktop\Data\Packages\stable-diffusion-webui\launch.py", line 48, in <module>
    main()
  File "C:\Users\WDAGUtilityAccount\Desktop\Data\Packages\stable-diffusion-webui\launch.py", line 39, in main
    prepare_environment()
  File "C:\Users\WDAGUtilityAccount\Desktop\Data\Packages\stable-diffusion-webui\modules\launch_utils.py", line 412, in prepare_environment
    git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash)
  File "C:\Users\WDAGUtilityAccount\Desktop\Data\Packages\stable-diffusion-webui\modules\launch_utils.py", line 192, in git_clone
    run(f'"{git}" clone --config core.filemode=false "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}", live=True)
  File "C:\Users\WDAGUtilityAccount\Desktop\Data\Packages\stable-diffusion-webui\modules\launch_utils.py", line 116, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't clone Stable Diffusion.
Command: "C:\Users\WDAGUtilityAccount\Desktop\Data\PortableGit\bin\git.exe" clone --config core.filemode=false "https://github.com/Stability-AI/stablediffusion.git" "C:\Users\WDAGUtilityAccount\Desktop\Data\Packages\stable-diffusion-webui\repositories\stable-diffusion-stability-ai"
Error code: 128

Version

v2.15.4

What Operating System are you using?

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions