update
This commit is contained in:
@@ -19,7 +19,7 @@ class GFPGANPlugin(BasePlugin):
|
||||
|
||||
import facexlib
|
||||
if hasattr(facexlib.detection.retinaface, "device"):
|
||||
facexlib.detection.retinaface.device = device
|
||||
facexlib.detection.retinaface.device = "cpu"
|
||||
|
||||
# Use GFPGAN for face enhancement
|
||||
self.face_enhancer = MyGFPGANer(
|
||||
@@ -30,6 +30,9 @@ class GFPGANPlugin(BasePlugin):
|
||||
device=device,
|
||||
bg_upsampler=upscaler.model if upscaler is not None else None,
|
||||
)
|
||||
self.face_enhancer.face_helper.face_det.mean_tensor.to("cpu")
|
||||
self.face_enhancer.face_helper.face_det = self.face_enhancer.face_helper.face_det.to("cpu")
|
||||
|
||||
|
||||
def __call__(self, rgb_np_img, files, form):
|
||||
weight = 0.5
|
||||
|
||||
Reference in New Issue
Block a user