From 2a66c69d9e5db4d1b175f1b885a1f6bfec1894d7 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Sat, 3 Jun 2023 09:37:46 +0200 Subject: [PATCH] Simplify all faces --- roop/swapper.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roop/swapper.py b/roop/swapper.py index 26b5ef6..5b457b8 100644 --- a/roop/swapper.py +++ b/roop/swapper.py @@ -29,8 +29,8 @@ def swap_face_in_frame(source_face, target_face, frame): return frame -def process_faces(source_face, frame, progress, all_faces=False): - if all_faces: +def process_faces(source_face, frame, progress): + if roop.globals.all_faces: many_faces = get_face_many(frame) if many_faces: for face in many_faces: @@ -56,7 +56,7 @@ def process_video(source_img, frame_paths): for frame_path in frame_paths: frame = cv2.imread(frame_path) try: - result = process_faces(source_face, frame, progress, roop.globals.all_faces) + result = process_faces(source_face, frame, progress) cv2.imwrite(frame_path, result) except Exception: progress.set_postfix(status='E', refresh=True)