Skip to content

Commit

Permalink
Fix security warning: use sha256 instead of md5 (#22373)
Browse files Browse the repository at this point in the history
### Description

Fix S360 warning: Use of unapproved hash algorithm or API MD5.
  • Loading branch information
tianleiwu authored Oct 10, 2024
1 parent 5cc2529 commit 2b0ea6c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def get_cached_model_name(self, model_name):
model_name = model_name + "_" + "_".join(self.pipeline_info.controlnet)

if hash_source:
model_name += "_" + hashlib.md5("\t".join(hash_source).encode("utf-8")).hexdigest()[:8]
model_name += "_" + hashlib.sha256("\t".join(hash_source).encode("utf-8")).hexdigest()[:8]

# TODO: When we support original VAE, we shall save custom VAE to another directory.

Expand Down

0 comments on commit 2b0ea6c

Please sign in to comment.