From dd1d45aa7909587a339288a90e3be13228ffb885 Mon Sep 17 00:00:00 2001 From: Qing Date: Mon, 3 Apr 2023 13:19:26 +0800 Subject: [PATCH] set face restore upscale to 1; realesrgan till to 512 --- lama_cleaner/plugins/gfpgan_plugin.py | 2 +- lama_cleaner/plugins/realesrgan.py | 2 +- lama_cleaner/plugins/restoreformer.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lama_cleaner/plugins/gfpgan_plugin.py b/lama_cleaner/plugins/gfpgan_plugin.py index af78219..2422094 100644 --- a/lama_cleaner/plugins/gfpgan_plugin.py +++ b/lama_cleaner/plugins/gfpgan_plugin.py @@ -25,7 +25,7 @@ class GFPGANPlugin(BasePlugin): # Use GFPGAN for face enhancement self.face_enhancer = MyGFPGANer( model_path=model_path, - upscale=2, + upscale=1, arch="clean", channel_multiplier=2, device=device, diff --git a/lama_cleaner/plugins/realesrgan.py b/lama_cleaner/plugins/realesrgan.py index bba2d07..a33546f 100644 --- a/lama_cleaner/plugins/realesrgan.py +++ b/lama_cleaner/plugins/realesrgan.py @@ -70,7 +70,7 @@ class RealESRGANUpscaler(BasePlugin): model_path=model_path, model=model_info["model"](), half=True if "cuda" in str(device) else False, - tile=640, + tile=512, tile_pad=10, pre_pad=10, device=device, diff --git a/lama_cleaner/plugins/restoreformer.py b/lama_cleaner/plugins/restoreformer.py index 198d103..0cd8b10 100644 --- a/lama_cleaner/plugins/restoreformer.py +++ b/lama_cleaner/plugins/restoreformer.py @@ -24,7 +24,7 @@ class RestoreFormerPlugin(BasePlugin): self.face_enhancer = MyGFPGANer( model_path=model_path, - upscale=2, + upscale=1, arch="RestoreFormer", channel_multiplier=2, device=device,