fix face restore dependend extensions

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2024-10-08 13:11:34 -04:00
parent ab32b8aba1
commit a722ed30d9
5 changed files with 33 additions and 6 deletions
+4
View File
@@ -44,6 +44,7 @@ clip_model = None
interrogator = modules.interrogate.InterrogateModels(os.path.join("models", "interrogate"))
sd_upscalers = []
detailers = []
face_restorers = []
yolo = None
tab_names = []
extra_networks = []
@@ -799,6 +800,9 @@ options_templates.update(options_section(('postprocessing', "Postprocessing"), {
"code_former_weight": OptionInfo(0.2, "CodeFormer weight parameter", gr.Slider, {"minimum": 0, "maximum": 1, "step": 0.01, "visible": False}),
"detailer_unload": OptionInfo(False, "Move detailer model to CPU when complete"),
"postprocessing_sep_face_restore": OptionInfo("<h2>Face restore</h2>", "", gr.HTML),
"face_restoration_model": OptionInfo("Face restorer", "Face restoration", gr.Radio, lambda: {"choices": ['None'] + [x.name() for x in face_restorers]}),
"postprocessing_sep_upscalers": OptionInfo("<h2>Upscaling</h2>", "", gr.HTML),
"upscaler_unload": OptionInfo(False, "Unload upscaler after processing"),
"upscaler_for_img2img": OptionInfo("None", "Default upscaler for image resize operations", gr.Dropdown, lambda: {"choices": [x.name for x in sd_upscalers], "visible": False}, refresh=refresh_upscalers),