diff options
author | Robert Barron <rubberbaron@robustspread.com> | 2023-08-14 07:35:17 +0000 |
---|---|---|
committer | Robert Barron <rubberbaron@robustspread.com> | 2023-08-14 07:35:17 +0000 |
commit | d61e31bae620632c026c927cf6538180447c6918 (patch) | |
tree | 0397dcc8e741ed391164fb6b7e8e374a46f0f4ce /modules/launch_utils.py | |
parent | 54f926b11d29910df9f813e2e0ea6d35c6f4a50d (diff) | |
parent | f3b96d4998d8ca376d33efa7a4454e8c28e24255 (diff) | |
download | stable-diffusion-webui-gfx803-d61e31bae620632c026c927cf6538180447c6918.tar.gz stable-diffusion-webui-gfx803-d61e31bae620632c026c927cf6538180447c6918.tar.bz2 stable-diffusion-webui-gfx803-d61e31bae620632c026c927cf6538180447c6918.zip |
Merge remote-tracking branch 'auto1111/dev' into shared-hires-prompt-test
Diffstat (limited to 'modules/launch_utils.py')
-rw-r--r-- | modules/launch_utils.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/modules/launch_utils.py b/modules/launch_utils.py index 2782872e..449a8755 100644 --- a/modules/launch_utils.py +++ b/modules/launch_utils.py @@ -173,9 +173,12 @@ def git_clone(url, dir, name, commithash=None): if current_hash == commithash:
return
- run_git('fetch', f"Fetching updates for {name}...", f"Couldn't fetch {name}", autofix=False)
+ if run_git(dir, name, 'config --get remote.origin.url', None, f"Couldn't determine {name}'s origin URL", live=False).strip() != url:
+ run_git(dir, name, f'remote set-url origin "{url}"', None, f"Failed to set {name}'s origin URL", live=False)
- run_git('checkout', f"Checking out commit for {name} with hash: {commithash}...", f"Couldn't checkout commit {commithash} for {name}", live=True)
+ run_git(dir, name, 'fetch', f"Fetching updates for {name}...", f"Couldn't fetch {name}", autofix=False)
+
+ run_git(dir, name, f'checkout {commithash}', f"Checking out commit for {name} with hash: {commithash}...", f"Couldn't checkout commit {commithash} for {name}", live=True)
return
@@ -243,7 +246,7 @@ def list_extensions(settings_file): disabled_extensions = set(settings.get('disabled_extensions', []))
disable_all_extensions = settings.get('disable_all_extensions', 'none')
- if disable_all_extensions != 'none':
+ if disable_all_extensions != 'none' or args.disable_extra_extensions or args.disable_all_extensions:
return []
return [x for x in os.listdir(extensions_dir) if x not in disabled_extensions]
@@ -319,12 +322,12 @@ def prepare_environment(): stable_diffusion_commit_hash = os.environ.get('STABLE_DIFFUSION_COMMIT_HASH', "cf1d67a6fd5ea1aa600c4df58e5b47da45f6bdbf")
stable_diffusion_xl_commit_hash = os.environ.get('STABLE_DIFFUSION_XL_COMMIT_HASH', "5c10deee76adad0032b412294130090932317a87")
- k_diffusion_commit_hash = os.environ.get('K_DIFFUSION_COMMIT_HASH', "c9fe758757e022f05ca5a53fa8fac28889e4f1cf")
+ k_diffusion_commit_hash = os.environ.get('K_DIFFUSION_COMMIT_HASH', "ab527a9a6d347f364e3d185ba6d714e22d80cb3c")
codeformer_commit_hash = os.environ.get('CODEFORMER_COMMIT_HASH', "c5b4593074ba6214284d6acd5f1719b6c5d739af")
blip_commit_hash = os.environ.get('BLIP_COMMIT_HASH', "48211a1594f1321b00f14c9f7a5b4813144b2fb9")
try:
- # the existance of this file is a signal to webui.sh/bat that webui needs to be restarted when it stops execution
+ # the existence of this file is a signal to webui.sh/bat that webui needs to be restarted when it stops execution
os.remove(os.path.join(script_path, "tmp", "restart"))
os.environ.setdefault('SD_WEBUI_RESTARTING', '1')
except OSError:
|