diff --git a/scripts/xyz/xyz_grid_classes.py b/scripts/xyz/xyz_grid_classes.py index 44faeb503..a6c6678b7 100644 --- a/scripts/xyz/xyz_grid_classes.py +++ b/scripts/xyz/xyz_grid_classes.py @@ -246,7 +246,7 @@ axis_options = [ AxisOption("[Refine] Refiner steps", float, apply_field("refiner_steps")), AxisOption("[Postprocess] Upscaler", str, apply_upscaler, cost=0.4, choices=lambda: [x.name for x in shared.sd_upscalers]), AxisOption("[Postprocess] Context", str, apply_context, choices=lambda: ["Add with forward", "Remove with forward", "Add with backward", "Remove with backward"]), - AxisOption("[Postprocess] Detailer", str, apply_detailer, fmt=format_value_add_label), + AxisOption("[Postprocess] Detailer", bool, apply_detailer, fmt=format_bool, choices=lambda: [False, True]), AxisOption("[Postprocess] Detailer strength", str, apply_field("detailer_strength")), AxisOption("[Quant] SDNQ quant mode", str, apply_sdnq_quant, cost=0.9, fmt=format_value_add_label, choices=lambda: ['none'] + sorted(shared.sdnq_quant_modes)), AxisOption("[Quant] SDNQ quant mode TE", str, apply_sdnq_quant_te, cost=0.9, fmt=format_value_add_label, choices=lambda: ['none'] + sorted(shared.sdnq_quant_modes)), diff --git a/scripts/xyz/xyz_grid_shared.py b/scripts/xyz/xyz_grid_shared.py index df666ac80..d11c8bee4 100644 --- a/scripts/xyz/xyz_grid_shared.py +++ b/scripts/xyz/xyz_grid_shared.py @@ -284,10 +284,8 @@ def apply_context(p: processing.StableDiffusionProcessingTxt2Img, opt, x): def apply_detailer(p, opt, x): - opt = opt.lower() - is_active = opt in ('true', 'yes', 'y', '1') - p.detailer_enabled = is_active - shared.log.debug(f'XYZ grid apply face-restore: "{x}"') + p.detailer_enabled = bool(opt) + shared.log.debug(f'XYZ grid apply detailer: "{x}"') def apply_control(field):