mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-01-17 03:38:36 +01:00
Revert "Fix face restoration model selection"
This reverts commit a5a1d33589
.
This commit is contained in:
parent
99c99ee9e3
commit
a548c026b1
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user