aboutsummaryrefslogtreecommitdiff
path: root/modules/sd_models.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-02-04 11:38:56 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-02-04 11:38:56 +0300
commit81823407d9b3c3daf2f9de59e0d75ef9a257f902 (patch)
treede6f577d5f1e58134147a1be0b4f5fd9673b5de3 /modules/sd_models.py
parent30228c67ca4d6236a2b1566d53a85305504d1992 (diff)
add --no-hashing
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r--modules/sd_models.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py
index 300387a9..6c6bb571 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -59,6 +59,9 @@ class CheckpointInfo:
def calculate_shorthash(self):
self.sha256 = hashes.sha256(self.filename, "checkpoint/" + self.name)
+ if self.sha256 is None:
+ return
+
self.shorthash = self.sha256[0:10]
if self.shorthash not in self.ids: