From 1973ea323ead7b662c85b74bc436e522736fe8e6 Mon Sep 17 00:00:00 2001 From: bluelovers Date: Sun, 29 Sep 2024 05:26:24 +0800 Subject: [PATCH] ci: auto update Billions_of_Wildcards --- .dev/update-hashes.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.dev/update-hashes.py b/.dev/update-hashes.py index 774bb22..d9c4fb3 100644 --- a/.dev/update-hashes.py +++ b/.dev/update-hashes.py @@ -40,10 +40,11 @@ def get_model_hashes(id: str | int, api_key: str = None): def update_bundle_hashes(api_key: str = None): C0rn_Fl4k3s = get_model_hashes(481009, api_key) lazy_wildcards = get_model_hashes(449400, api_key) + Billions_of_Wildcards = get_model_hashes(138970, api_key) bundle_hashes_file = "./sd_webui_pnginfo_injection/bundle_hashes.py" - if C0rn_Fl4k3s or lazy_wildcards: + if C0rn_Fl4k3s or lazy_wildcards or Billions_of_Wildcards: with open(bundle_hashes_file, "r") as file: lines = file.readlines() @@ -63,6 +64,13 @@ def update_bundle_hashes(api_key: str = None): lines[i] = f' {hashes_name} = "{auto_v2_hash}"\n' print(f"Updated {hashes_name} value to {auto_v2_hash} in {bundle_hashes_file}") + if Billions_of_Wildcards: + hashes_name = 'Billions_of_Wildcards' + auto_v2_hash = Billions_of_Wildcards + if hashes_name in line: + lines[i] = f' {hashes_name} = "{auto_v2_hash}"\n' + print(f"Updated {hashes_name} value to {auto_v2_hash} in {bundle_hashes_file}") + with open(bundle_hashes_file, "w", newline='\n') as file: file.writelines(lines)