fix: do not generate hashes when arg --disable-metadata is used

This commit is contained in:
Manuel Schmid 2024-01-15 23:52:57 +01:00
parent a2153dba7d
commit 80ad0d070e
No known key found for this signature in database
GPG Key ID: 32C4F7569B40B84B
1 changed files with 9 additions and 9 deletions

View File

@ -202,16 +202,16 @@ def worker():
modules.patch.adm_scaler_end = advanced_parameters.adm_scaler_end = 0.0
steps = 8
base_model_path = os.path.join(modules.config.path_checkpoints, base_model_name)
base_model_hash = calculate_sha256(base_model_path)[0:10]
if not args_manager.args.disable_metadata:
base_model_path = os.path.join(modules.config.path_checkpoints, base_model_name)
base_model_hash = calculate_sha256(base_model_path)[0:10]
lora_hashes = []
for (n, w) in loras:
if n != 'None':
lora_path = os.path.join(modules.config.path_loras, n)
lora_hashes.append(f'{n.split(".")[0]}: {calculate_sha256(lora_path)[0:10]}')
lora_hashes_string = ", ".join(lora_hashes)
print(lora_hashes_string)
lora_hashes = []
for (n, w) in loras:
if n != 'None':
lora_path = os.path.join(modules.config.path_loras, n)
lora_hashes.append(f'{n.split(".")[0]}: {calculate_sha256(lora_path)[0:10]}')
lora_hashes_string = ", ".join(lora_hashes)
modules.patch.adaptive_cfg = advanced_parameters.adaptive_cfg
print(f'[Parameters] Adaptive CFG = {modules.patch.adaptive_cfg}')