mirror of
https://github.com/facefusion/facefusion.git
synced 2026-07-29 13:28:50 +02:00
fix hash creation in face store
This commit is contained in:
@@ -10,7 +10,7 @@ FACE_STORE : FaceStore = {}
|
||||
|
||||
def get_faces(vision_frame : VisionFrame) -> Optional[List[Face]]:
|
||||
if is_vision_frame(vision_frame):
|
||||
vision_hash = create_hash(vision_frame.data)
|
||||
vision_hash = create_hash(vision_frame.tobytes())
|
||||
|
||||
if FACE_STORE.get(vision_hash):
|
||||
return FACE_STORE.get(vision_hash).get('faces')
|
||||
@@ -20,7 +20,7 @@ def get_faces(vision_frame : VisionFrame) -> Optional[List[Face]]:
|
||||
|
||||
def set_faces(vision_frame : VisionFrame, faces : List[Face]) -> None:
|
||||
if is_vision_frame(vision_frame):
|
||||
vision_hash = create_hash(vision_frame.data)
|
||||
vision_hash = create_hash(vision_frame.tobytes())
|
||||
FACE_STORE.setdefault(vision_hash,
|
||||
{
|
||||
'lock': threading.Lock()
|
||||
@@ -29,7 +29,7 @@ def set_faces(vision_frame : VisionFrame, faces : List[Face]) -> None:
|
||||
|
||||
def resolve_lock(vision_frame : VisionFrame) -> threading.Lock:
|
||||
if is_vision_frame(vision_frame):
|
||||
vision_hash = create_hash(vision_frame.data)
|
||||
vision_hash = create_hash(vision_frame.tobytes())
|
||||
return FACE_STORE.setdefault(vision_hash,
|
||||
{
|
||||
'lock': threading.Lock()
|
||||
|
||||
Reference in New Issue
Block a user