Revert "Fix face restoration model selection"

This reverts commit a5a1d33589.
This commit is contained in:
patriceac 2023-05-25 00:32:48 -07:00
parent 99c99ee9e3
commit a548c026b1

View File

@ -107,18 +107,12 @@ def resolve_model_to_use(model_name: str = None, model_type: str = None):
def reload_models_if_necessary(context: Context, task_data: TaskData):
if hasattr(task_data, 'use_face_correction') and task_data.use_face_correction:
face_correction_model = "codeformer" if "codeformer" in task_data.use_face_correction.lower() else "gfpgan"
face_correction_value = task_data.use_face_correction
else:
face_correction_model = "gfpgan"
face_correction_value = None
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: face_correction_value,
face_correction_model: 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,