From 27f77f92fbbe91ab6ad18e1a7996d6faa25ce154 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Tue, 4 Mar 2025 12:11:40 +0100 Subject: [PATCH] Use different hashing for the face store --- facefusion/face_store.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/facefusion/face_store.py b/facefusion/face_store.py index eb576a1..fe88856 100644 --- a/facefusion/face_store.py +++ b/facefusion/face_store.py @@ -34,8 +34,10 @@ def clear_static_faces() -> None: def create_frame_hash(vision_frame : VisionFrame) -> Optional[str]: - return hashlib.sha1(vision_frame.tobytes()).hexdigest() if numpy.any(vision_frame) else None - + if numpy.any(vision_frame): + frame_hash = hashlib.blake2b(vision_frame.tobytes(), digest_size = 16).hexdigest() + return frame_hash + return None def get_reference_faces() -> Optional[FaceSet]: if FACE_STORE['reference_faces']: