diff options
author | Jairo Correa <jn.j41r0@gmail.com> | 2022-10-06 16:41:37 +0000 |
---|---|---|
committer | Jairo Correa <jn.j41r0@gmail.com> | 2022-10-06 16:41:37 +0000 |
commit | b66aa334a908cb8d760f2a65c1ebdf0cf336950a (patch) | |
tree | 9085640d50976eb26af3804683e60101ccb13d4a /launch.py | |
parent | 82380d9ac18614c87bebba1b4cfd4b147cc76a18 (diff) | |
parent | 82eb8ea452b1e63535c58d15ec6db2ad2342faa8 (diff) | |
download | stable-diffusion-webui-gfx803-b66aa334a908cb8d760f2a65c1ebdf0cf336950a.tar.gz stable-diffusion-webui-gfx803-b66aa334a908cb8d760f2a65c1ebdf0cf336950a.tar.bz2 stable-diffusion-webui-gfx803-b66aa334a908cb8d760f2a65c1ebdf0cf336950a.zip |
Merge branch 'master' into fix-vram
Diffstat (limited to 'launch.py')
-rw-r--r-- | launch.py | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -19,7 +19,7 @@ clip_package = os.environ.get('CLIP_PACKAGE', "git+https://github.com/openai/CLI stable_diffusion_commit_hash = os.environ.get('STABLE_DIFFUSION_COMMIT_HASH', "69ae4b35e0a0f6ee1af8bb9a5d0016ccb27e36dc")
taming_transformers_commit_hash = os.environ.get('TAMING_TRANSFORMERS_COMMIT_HASH', "24268930bf1dce879235a7fddd0b2355b84d7ea6")
-k_diffusion_commit_hash = os.environ.get('K_DIFFUSION_COMMIT_HASH', "a7ec1974d4ccb394c2dca275f42cd97490618924")
+k_diffusion_commit_hash = os.environ.get('K_DIFFUSION_COMMIT_HASH', "f4e99857772fc3a126ba886aadf795a332774878")
codeformer_commit_hash = os.environ.get('CODEFORMER_COMMIT_HASH', "c5b4593074ba6214284d6acd5f1719b6c5d739af")
blip_commit_hash = os.environ.get('BLIP_COMMIT_HASH', "48211a1594f1321b00f14c9f7a5b4813144b2fb9")
@@ -86,6 +86,15 @@ def git_clone(url, dir, name, commithash=None): # TODO clone into temporary dir and move if successful
if os.path.exists(dir):
+ if commithash is None:
+ return
+
+ current_hash = run(f'"{git}" -C {dir} rev-parse HEAD', None, f"Couldn't determine {name}'s hash: {commithash}").strip()
+ if current_hash == commithash:
+ return
+
+ run(f'"{git}" -C {dir} fetch', f"Fetching updates for {name}...", f"Couldn't fetch {name}")
+ run(f'"{git}" -C {dir} checkout {commithash}', f"Checking out commint for {name} with hash: {commithash}...", f"Couldn't checkout commit {commithash} for {name}")
return
run(f'"{git}" clone "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}")
|