From ed0dc79a151d477dd27024f948aa93394f2cc0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A8?= Date: Mon, 17 Feb 2025 03:21:55 +0100 Subject: [PATCH] reactivated the old hashing that work for civitai (#1647) * reactivated the old hashing that work for civitai * flush print --------- Co-authored-by: DenOfEquity <166248528+DenOfEquity@users.noreply.github.com> --- modules/hashes.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/hashes.py b/modules/hashes.py index d5ecc771..41c13aba 100644 --- a/modules/hashes.py +++ b/modules/hashes.py @@ -20,7 +20,8 @@ def calculate_sha256_real(filename): def calculate_sha256(filename): - return forge_fake_calculate_sha256(filename) + print("Calculating real hash: ", filename) + return calculate_sha256_real(filename) def forge_fake_calculate_sha256(filename): @@ -59,8 +60,8 @@ def sha256(filename, title, use_addnet_hash=False): if shared.cmd_opts.no_hashing: return None - print(f"Calculating sha256 for {filename}: ", end='') - sha256_value = forge_fake_calculate_sha256(filename) + print(f"Calculating sha256 for {filename}: ", end='', flush=True) + sha256_value = calculate_sha256_real(filename) print(f"{sha256_value}") hashes[title] = {