Originally posted by w-e-w December 20, 2025
for any new install of stable-diffusion-webui you will incounter an issue during initial installation
Cloning Stable Diffusion into B:\Downloads\sd.webui\webui\repositories\stable-diffusion-stability-ai...
Cloning into 'B:\Downloads\sd.webui\webui\repositories\stable-diffusion-stability-ai'...
Username for 'https://github.com':
or
Cloning Stable Diffusion into B:\GitHub\stable-diffusion-webui\repositories\stable-diffusion-stability-ai...
Cloning into 'B:\GitHub\stable-diffusion-webui\repositories\stable-diffusion-stability-ai'...
remote: Repository not found.
fatal: repository 'https://github.com/Stability-AI/stablediffusion.git/' not found
Traceback (most recent call last):
File "B:\GitHub\stable-diffusion-webui\launch.py", line 53, in <module>
main()
File "B:\GitHub\stable-diffusion-webui\launch.py", line 44, in main
prepare_environment()
File "B:\GitHub\stable-diffusion-webui\modules\launch_utils.py", line 443, in prepare_environment
git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash)
File "B:\GitHub\stable-diffusion-webui\modules\launch_utils.py", line 189, 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 "B:\GitHub\stable-diffusion-webui\modules\launch_utils.py", line 113, in run
raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't clone Stable Diffusion.
Command: "git" clone --config core.filemode=false "https://github.com/Stability-AI/stablediffusion.git" "B:\GitHub\stable-diffusion-webui\repositories\stable-diffusion-stability-ai"
Error code: 128
the cause of the issue is because during the initial installation webui will clone (download) additional code form the repository https://github.com/Stability-AI/stablediffusion, since some days ago this repository is no longer available due to either being removed or private, as webui is unable to download required code it fails to install
this clone is only done if the <sd-webui-dir>/repositories/stable-diffusion-stability-ai is not found, existing installations that has already cloned the repo won't be affected
Fix: we have updated the dev branch
on the dev branch we now update webui so that it clone the requred code from a frok https://github.com/w-e-w/stablediffusion.git
see PR
so the simplest thing this thing you can do to fix this issue is to switch to dev branch
this can be done by running the fellowing command in your web-ui directory
it's possible that you may need to run git pull after you switch the branch to ensure that the code is updated
Alternatively fix
as the fixed is only applied to the dev branch, if for some reason you're using an alternative version of webui or can't/don't want to switch the dev branch you could configure webui to clone from a different URL by setting the environment variable
STABLE_DIFFUSION_REPO to https://github.com/w-e-w/stablediffusion.git
for Windows (without custom launcher)
add the following line to webui-user.bat
set STABLE_DIFFUSION_REPO=https://github.com/w-e-w/stablediffusion.git
the file should end up looking like this
@echo off
set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=
set STABLE_DIFFUSION_REPO=https://github.com/w-e-w/stablediffusion.git
call webui.bat
for Linux and Mac
similarly add the following line to webui-user.sh
export STABLE_DIFFUSION_REPO="https://github.com/w-e-w/stablediffusion.git"
Update: This has been fixed in StabilityMatrix >= v2.15.6
you can add environment variable in the setting
Setting > Environment Variable (Edit Button) > clicke + button then input the follow
| Name |
Value |
STABLE_DIFFUSION_REPO |
https://github.com/w-e-w/stablediffusion.git |
Click to show screenshot
other launchs may have similar Environment Variable settings, if so the same procedure can be applied
Windows Generic method
if you are on Windows and using a launcher does not have advanced settings that provide a way for you to add Environment Variable
it is still possible to configure Environment Variables from the operating system level
Steps
- open
Windwos Settings > System
- goto
About section (scroll down, normally it should be the last item)
- on
About click on Advanced system settings to open System Properties
- on
System Properties click on Environment Variables to open Environment Variables
- on
Environment Variables click New
- input the follow to
Variable name and Variable value
| Variable name |
Variable value |
STABLE_DIFFUSION_REPO |
https://github.com/w-e-w/stablediffusion.git |
- click
OK to confirm adding the new environment variables, (you should a new entry is added)
- click
OK to again confirm again save your changes
- click
OK to again confirm that you confirm for the last time to exit
If you follow the steps correctly you should be able to install web ui in any launcher as normal
Click to show screenshot
Last resort fix
if you are unable to accomplish any of the above methods the last resort woud be to edit the code directly
this method though straightforward but it can potentially cause issues with git in the future so it is not recommended
open stable-diffusion-webui/modules/launch_utils.py find the following line and modify it
find
|
stable_diffusion_xl_repo = os.environ.get('STABLE_DIFFUSION_XL_REPO', "https://github.com/Stability-AI/generative-models.git") |
modify it to
|
stable_diffusion_repo = os.environ.get('STABLE_DIFFUSION_REPO', "https://github.com/w-e-w/stablediffusion.git") |
- stable_diffusion_repo = os.environ.get('STABLE_DIFFUSION_REPO', "https://github.com/Stability-AI/stablediffusion.git")
+ stable_diffusion_repo = os.environ.get('STABLE_DIFFUSION_REPO', "https://github.com/w-e-w/stablediffusion.git")
Additional Troubleshooting
after applying the above fix if you're still getting errors
try deleting the folder stable-diffusion-webui\repositories\stable-diffusion-stability-ai then try again
Discussed in #17212
Originally posted by w-e-w December 20, 2025
for any new install of stable-diffusion-webui you will incounter an issue during initial installation
or
the cause of the issue is because during the initial installation webui will clone (download) additional code form the repository https://github.com/Stability-AI/stablediffusion, since some days ago this repository is no longer available due to either being removed or private, as webui is unable to download required code it fails to install
Fix: we have updated the
devbranchon the dev branch we now update webui so that it clone the requred code from a frok https://github.com/w-e-w/stablediffusion.git
see PR
so the simplest thing this thing you can do to fix this issue is to switch to dev branch
this can be done by running the fellowing command in your web-ui directory
it's possible that you may need to run
git pullafter you switch the branch to ensure that the code is updatedAlternatively fix
as the fixed is only applied to the dev branch, if for some reason you're using an alternative version of webui or can't/don't want to switch the
devbranch you could configure webui to clone from a different URL by setting the environment variableSTABLE_DIFFUSION_REPOtohttps://github.com/w-e-w/stablediffusion.gitfor Windows (without custom launcher)
add the following line to
webui-user.batthe file should end up looking like this
for Linux and Mac
similarly add the following line to
webui-user.shFor StabilityMatrix
you can add environment variable in the setting
Setting > Environment Variable (Edit Button) > clicke
+button then input the followSTABLE_DIFFUSION_REPOhttps://github.com/w-e-w/stablediffusion.gitClick to show screenshot
Windows Generic method
if you are on Windows and using a launcher does not have advanced settings that provide a way for you to add
Environment Variableit is still possible to configure
Environment Variablesfrom the operating system levelSteps
Windwos Settings > SystemAboutsection (scroll down, normally it should be the last item)Aboutclick onAdvanced system settingsto openSystem PropertiesSystem Propertiesclick onEnvironment Variablesto openEnvironment VariablesEnvironment VariablesclickNewVariable nameandVariable valueSTABLE_DIFFUSION_REPOhttps://github.com/w-e-w/stablediffusion.gitOKto confirm adding the new environment variables, (you should a new entry is added)OKto again confirm again save your changesOKto again confirm that you confirm for the last time to exitIf you follow the steps correctly you should be able to install web ui in any launcher as normal
Click to show screenshot
Last resort fix
if you are unable to accomplish any of the above methods the last resort woud be to edit the code directly
open
stable-diffusion-webui/modules/launch_utils.py find the following line and modify itfind
stable-diffusion-webui/modules/launch_utils.py
Line 350 in 82a973c
modify it to
stable-diffusion-webui/modules/launch_utils.py
Line 381 in fd68e0c
Additional Troubleshooting
after applying the above fix if you're still getting errors
try deleting the folder
stable-diffusion-webui\repositories\stable-diffusion-stability-aithen try again