mirror of
https://github.com/hacksider/Deep-Live-Cam.git
synced 2025-03-28 18:51:57 +01:00
Revert "Update face_enhancer.py"
This reverts commit ed7a21687c4de9f32659c30a17571ce568c30b47.
This commit is contained in:
parent
ed7a21687c
commit
41c6916273
@ -54,12 +54,12 @@ def get_face_enhancer() -> Any:
|
|||||||
with THREAD_LOCK:
|
with THREAD_LOCK:
|
||||||
if FACE_ENHANCER is None:
|
if FACE_ENHANCER is None:
|
||||||
model_path = os.path.join(models_dir, "GFPGANv1.4.pth")
|
model_path = os.path.join(models_dir, "GFPGANv1.4.pth")
|
||||||
elif platform.system() == "Darwin": # Mac OS
|
if platform.system() == "Darwin": # Mac OS
|
||||||
mps_device = None
|
mps_device = None
|
||||||
elif torch.backends.mps.is_available():
|
if torch.backends.mps.is_available():
|
||||||
mps_device = torch.device("mps")
|
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, device=mps_device) # type: ignore[attr-defined]
|
||||||
elif: # Other OS
|
else: # Other OS
|
||||||
FACE_ENHANCER = gfpgan.GFPGANer(model_path=model_path, upscale=1) # type: ignore[attr-defined]
|
FACE_ENHANCER = gfpgan.GFPGANer(model_path=model_path, upscale=1) # type: ignore[attr-defined]
|
||||||
return FACE_ENHANCER
|
return FACE_ENHANCER
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user