diff options
author | w-e-w <40751091+w-e-w@users.noreply.github.com> | 2023-07-17 03:45:10 +0000 |
---|---|---|
committer | w-e-w <40751091+w-e-w@users.noreply.github.com> | 2023-07-17 03:45:10 +0000 |
commit | c03856bfdf30fd0e061caefd60231eb86a983c71 (patch) | |
tree | 75b833cf03206e5f28cd8095a2895e38b88f8b41 /scripts/xyz_grid.py | |
parent | 7870937c770aaba9e681c299f923ba645163c85c (diff) | |
download | stable-diffusion-webui-gfx803-c03856bfdf30fd0e061caefd60231eb86a983c71.tar.gz stable-diffusion-webui-gfx803-c03856bfdf30fd0e061caefd60231eb86a983c71.tar.bz2 stable-diffusion-webui-gfx803-c03856bfdf30fd0e061caefd60231eb86a983c71.zip |
reversible boolean_choice order
Diffstat (limited to 'scripts/xyz_grid.py')
-rw-r--r-- | scripts/xyz_grid.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index ee30747c..bddc28c7 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -152,8 +152,10 @@ def apply_override(field, boolean: bool = False): return fun
-def boolean_choice():
- return ["True", "False"]
+def boolean_choice(reverse: bool = False):
+ def choice():
+ return ["False", "True"] if reverse else ["True", "False"]
+ return choice
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("Token merging ratio", float, apply_override('token_merging_ratio')),
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)),
]
|