Commit c03856bf authored by w-e-w's avatar w-e-w
Browse files

reversible boolean_choice order

parent 7870937c
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -152,8 +152,10 @@ def apply_override(field, boolean: bool = False):
    return fun
    return fun




def boolean_choice():
def boolean_choice(reverse: bool = False):
    return ["True", "False"]
    def choice():
        return ["False", "True"] if reverse else ["True", "False"]
    return choice




def format_value_add_label(p, opt, x):
def format_value_add_label(p, opt, x):
@@ -242,7 +244,7 @@ axis_options = [
    AxisOption("Face restore", str, apply_face_restore, format_value=format_value),
    AxisOption("Face restore", str, apply_face_restore, format_value=format_value),
    AxisOption("Token merging ratio", float, apply_override('token_merging_ratio')),
    AxisOption("Token merging ratio", float, apply_override('token_merging_ratio')),
    AxisOption("Token merging ratio high-res", float, apply_override('token_merging_ratio_hr')),
    AxisOption("Token merging ratio high-res", float, apply_override('token_merging_ratio_hr')),
    AxisOption("Always discard next-to-last sigma", str, apply_override('always_discard_next_to_last_sigma', boolean=True), choices=boolean_choice),
    AxisOption("Always discard next-to-last sigma", str, apply_override('always_discard_next_to_last_sigma', boolean=True), choices=boolean_choice(reverse=True)),
]
]