From 3a059bb919b63b77fbddf383d9124d492bdc7fec Mon Sep 17 00:00:00 2001 From: patriceac <48073125+patriceac@users.noreply.github.com> Date: Thu, 25 May 2023 00:32:57 -0700 Subject: [PATCH] Revert "Support for CodeFormer" This reverts commit a25364732b3f74dbfd5083cc4d7a0f84ccc5d9d5. --- ui/easydiffusion/model_manager.py | 3 +-- ui/easydiffusion/renderer.py | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ui/easydiffusion/model_manager.py b/ui/easydiffusion/model_manager.py index 2bb4852d..7bf56575 100644 --- a/ui/easydiffusion/model_manager.py +++ b/ui/easydiffusion/model_manager.py @@ -107,12 +107,11 @@ def resolve_model_to_use(model_name: str = None, model_type: str = None): def reload_models_if_necessary(context: Context, task_data: TaskData): - face_correction_model = "codeformer" if "codeformer" in task_data.use_face_correction.lower() else "gfpgan" model_paths_in_req = { "stable-diffusion": task_data.use_stable_diffusion_model, "vae": task_data.use_vae_model, "hypernetwork": task_data.use_hypernetwork_model, - face_correction_model: task_data.use_face_correction, + "gfpgan": task_data.use_face_correction, "realesrgan": task_data.use_upscale, "nsfw_checker": True if task_data.block_nsfw else None, "lora": task_data.use_lora_model, diff --git a/ui/easydiffusion/renderer.py b/ui/easydiffusion/renderer.py index e1176c8b..f685d038 100644 --- a/ui/easydiffusion/renderer.py +++ b/ui/easydiffusion/renderer.py @@ -158,9 +158,7 @@ def filter_images(task_data: TaskData, images: list, user_stopped): filters_to_apply = [] if task_data.block_nsfw: filters_to_apply.append("nsfw_checker") - if task_data.use_face_correction and "codeformer" in task_data.use_face_correction.lower(): - filters_to_apply.append("codeformer") - elif task_data.use_face_correction and "gfpgan" in task_data.use_face_correction.lower(): + if task_data.use_face_correction and "gfpgan" in task_data.use_face_correction.lower(): filters_to_apply.append("gfpgan") if task_data.use_upscale and "realesrgan" in task_data.use_upscale.lower(): filters_to_apply.append("realesrgan")