diff options
author | Vespinian <vespinian@proton.me> | 2023-03-11 17:33:35 +0000 |
---|---|---|
committer | Vespinian <vespinian@proton.me> | 2023-03-11 17:33:35 +0000 |
commit | 46f9fe3cd6b7be712d85cdfc2cdff7ac3fe878b5 (patch) | |
tree | a134b22d856ab534c497b04c0d7ec87935cfcce7 /launch.py | |
parent | 2174f58daee1e077eec1125e196d34cc93dbaf23 (diff) | |
parent | 94ffa9fc5386e51f20692ab46906135e8de33110 (diff) | |
download | stable-diffusion-webui-gfx803-46f9fe3cd6b7be712d85cdfc2cdff7ac3fe878b5.tar.gz stable-diffusion-webui-gfx803-46f9fe3cd6b7be712d85cdfc2cdff7ac3fe878b5.tar.bz2 stable-diffusion-webui-gfx803-46f9fe3cd6b7be712d85cdfc2cdff7ac3fe878b5.zip |
Merge branch 'master' of https://github.com/AUTOMATIC1111/stable-diffusion-webui
Diffstat (limited to 'launch.py')
-rw-r--r-- | launch.py | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -161,7 +161,17 @@ def git_clone(url, dir, name, commithash=None): if commithash is not None:
run(f'"{git}" -C "{dir}" checkout {commithash}', None, "Couldn't checkout {name}'s hash: {commithash}")
-
+
+def git_pull_recursive(dir):
+ for subdir, _, _ in os.walk(dir):
+ if os.path.exists(os.path.join(subdir, '.git')):
+ try:
+ output = subprocess.check_output([git, '-C', subdir, 'pull', '--autostash'])
+ print(f"Pulled changes for repository in '{subdir}':\n{output.decode('utf-8').strip()}\n")
+ except subprocess.CalledProcessError as e:
+ print(f"Couldn't perform 'git pull' on repository in '{subdir}':\n{e.output.decode('utf-8').strip()}\n")
+
+
def version_check(commit):
try:
import requests
@@ -247,6 +257,7 @@ def prepare_environment(): args, _ = parser.parse_known_args(sys.argv)
sys.argv, _ = extract_arg(sys.argv, '-f')
+ sys.argv, update_all_extensions = extract_arg(sys.argv, '--update-all-extensions')
sys.argv, skip_torch_cuda_test = extract_arg(sys.argv, '--skip-torch-cuda-test')
sys.argv, skip_python_version_check = extract_arg(sys.argv, '--skip-python-version-check')
sys.argv, reinstall_xformers = extract_arg(sys.argv, '--reinstall-xformers')
@@ -312,6 +323,9 @@ def prepare_environment(): if update_check:
version_check(commit)
+
+ if update_all_extensions:
+ git_pull_recursive(dir_extensions)
if "--exit" in sys.argv:
print("Exiting because of --exit argument")
|