From a1d9b7374285e4e12c58a84caa11886d20ac67a3 Mon Sep 17 00:00:00 2001 From: Kenneth Estanislao Date: Mon, 16 Dec 2024 22:46:39 +0800 Subject: [PATCH] Revert "Merge pull request #829 from RishonLi/patch-1" This reverts commit 5f5fe8890a9116f078a513ec3d8c42114a0fdb84, reversing changes made to a9e8f273604140107cbbf03974e00655e963d447. --- modules/processors/frame/face_enhancer.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/processors/frame/face_enhancer.py b/modules/processors/frame/face_enhancer.py index bb4031f..7874e35 100644 --- a/modules/processors/frame/face_enhancer.py +++ b/modules/processors/frame/face_enhancer.py @@ -49,10 +49,7 @@ def get_face_enhancer() -> Any: with THREAD_LOCK: if FACE_ENHANCER is None: model_path = os.path.join(models_dir, 'GFPGANv1.4.pth') - mps_device = None - if torch.backends.mps.is_available(): - mps_device = torch.device("mps") - FACE_ENHANCER = gfpgan.GFPGANer(model_path=model_path, upscale=1, device=mps_device) # type: ignore[attr-defined] + FACE_ENHANCER = gfpgan.GFPGANer(model_path=model_path, upscale=1) # type: ignore[attr-defined] return FACE_ENHANCER