From a7a4b9b065b91070c386dad0b5994ccfe6f53c19 Mon Sep 17 00:00:00 2001 From: ivideogameboss Date: Mon, 19 Aug 2024 16:46:22 -0500 Subject: [PATCH] Add two face flip support to many face option --- modules/processors/frame/face_swapper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/processors/frame/face_swapper.py b/modules/processors/frame/face_swapper.py index ef1da0b..d45eca0 100644 --- a/modules/processors/frame/face_swapper.py +++ b/modules/processors/frame/face_swapper.py @@ -53,7 +53,10 @@ def process_frame(source_face: List[Face], temp_frame: Frame) -> Frame: many_faces = get_many_faces(temp_frame) if many_faces: for target_face in many_faces: - temp_frame = swap_face(source_face[0], target_face, temp_frame) + if modules.globals.flip_faces: + temp_frame = swap_face(source_face[1], target_face, temp_frame) + else: + temp_frame = swap_face(source_face[0], target_face, temp_frame) else: target_faces = get_two_faces(temp_frame) # Check if more then one target face is found