Skip to content

Commit 340c1cc

Browse files
Merge pull request #12463 from catboxanon/fix/vae-hash
Properly return `None` for VAE hash when using `--no-hashing`
2 parents 2c79f2a + d456fb7 commit 340c1cc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/sd_vae.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ def get_loaded_vae_hash():
3131
if loaded_vae_file is None:
3232
return None
3333

34-
return hashes.sha256(loaded_vae_file, 'vae')[0:10]
34+
sha256 = hashes.sha256(loaded_vae_file, 'vae')
35+
36+
return sha256[0:10] if sha256 else None
3537

3638

3739
def get_base_vae(model):

0 commit comments

Comments
 (0)