aboutsummaryrefslogtreecommitdiffstats
path: root/modules/hashes.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-02-04 08:38:56 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-02-04 08:38:56 +0000
commit81823407d9b3c3daf2f9de59e0d75ef9a257f902 (patch)
treede6f577d5f1e58134147a1be0b4f5fd9673b5de3 /modules/hashes.py
parent30228c67ca4d6236a2b1566d53a85305504d1992 (diff)
downloadstable-diffusion-webui-gfx803-81823407d9b3c3daf2f9de59e0d75ef9a257f902.tar.gz
stable-diffusion-webui-gfx803-81823407d9b3c3daf2f9de59e0d75ef9a257f902.tar.bz2
stable-diffusion-webui-gfx803-81823407d9b3c3daf2f9de59e0d75ef9a257f902.zip
add --no-hashing
Diffstat (limited to 'modules/hashes.py')
-rw-r--r--modules/hashes.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/hashes.py b/modules/hashes.py
index 819362a3..83272a07 100644
--- a/modules/hashes.py
+++ b/modules/hashes.py
@@ -4,6 +4,7 @@ import os.path
import filelock
+from modules import shared
from modules.paths import data_path
@@ -68,6 +69,9 @@ def sha256(filename, title):
if sha256_value is not None:
return sha256_value
+ if shared.cmd_opts.no_hashing:
+ return None
+
print(f"Calculating sha256 for {filename}: ", end='')
sha256_value = calculate_sha256(filename)
print(f"{sha256_value}")