option - face

This commit is contained in:
Haoming
2025-08-05 09:47:40 +08:00
parent 6112462dd9
commit 31f5e707a6
+5 -5
View File
@@ -132,12 +132,12 @@ options_templates.update(
options_templates.update(
options_section(
("face-restoration", "Face restoration", "postprocessing"),
("face-restoration", "Face Restoration", "postprocessing"),
{
"face_restoration": OptionInfo(False, "Restore faces", infotext="Face restoration").info("will use a third-party model on generation result to reconstruct faces"),
"face_restoration_model": OptionInfo("CodeFormer", "Face restoration model", gr.Radio, lambda: {"choices": [x.name() for x in shared.face_restorers]}),
"code_former_weight": OptionInfo(0.5, "CodeFormer weight", gr.Slider, {"minimum": 0, "maximum": 1, "step": 0.01}).info("0 = maximum effect; 1 = minimum effect"),
"face_restoration_unload": OptionInfo(False, "Move face restoration model from VRAM into RAM after processing"),
"face_restoration": OptionInfo(False, "Restore Faces", infotext="Face restoration").info("after each generation, process the face(s) with a 3rd-party model"),
"face_restoration_model": OptionInfo("CodeFormer", "Face Restoration Model", gr.Radio, lambda: {"choices": [x.name() for x in shared.face_restorers]}),
"code_former_weight": OptionInfo(0.5, "CodeFormer Strength", gr.Slider, {"minimum": 0, "maximum": 1, "step": 0.05}).info("0 = max effect; 1 = min effect"),
"face_restoration_unload": OptionInfo(False, "Move the model to CPU after restoration"),
},
)
)