From 82cafcdc8b038f80a8ae9cee8e0dc7ac0155d2ec Mon Sep 17 00:00:00 2001 From: henryruhs Date: Fri, 2 Jun 2023 19:26:08 +0200 Subject: [PATCH] Fix broken globals --- roop/swapper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roop/swapper.py b/roop/swapper.py index 27d2d37..bfc4d63 100644 --- a/roop/swapper.py +++ b/roop/swapper.py @@ -12,7 +12,7 @@ def get_face_swapper(): global FACE_SWAPPER if FACE_SWAPPER is None: model_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), '../inswapper_128.onnx') - FACE_SWAPPER = insightface.model_zoo.get_model(model_path, providers=core.globals.providers) + FACE_SWAPPER = insightface.model_zoo.get_model(model_path, providers=roop.globals.providers) return FACE_SWAPPER @@ -49,7 +49,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, core.globals.all_faces) + result = process_faces(source_face, frame, progress, roop.globals.all_faces) cv2.imwrite(frame_path, result) except Exception: progress.set_postfix(status='E', refresh=True)