Skip to content

Commit

Permalink
Merge pull request #12463 from catboxanon/fix/vae-hash
Browse files Browse the repository at this point in the history
Properly return `None` for VAE hash when using `--no-hashing`
  • Loading branch information
AUTOMATIC1111 committed Aug 11, 2023
2 parents 2c79f2a + d456fb7 commit 340c1cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/sd_vae.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ def get_loaded_vae_hash():
if loaded_vae_file is None:
return None

return hashes.sha256(loaded_vae_file, 'vae')[0:10]
sha256 = hashes.sha256(loaded_vae_file, 'vae')

return sha256[0:10] if sha256 else None


def get_base_vae(model):
Expand Down

0 comments on commit 340c1cc

Please sign in to comment.