Revert "Support for CodeFormer"

This reverts commit a25364732b.
This commit is contained in:
patriceac 2023-05-25 00:32:57 -07:00
parent a548c026b1
commit 3a059bb919
2 changed files with 2 additions and 5 deletions

View File

@ -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,

View File

@ -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")