diff options
author | w-e-w <40751091+w-e-w@users.noreply.github.com> | 2023-07-17 03:25:29 +0000 |
---|---|---|
committer | w-e-w <40751091+w-e-w@users.noreply.github.com> | 2023-07-17 03:25:29 +0000 |
commit | 7870937c770aaba9e681c299f923ba645163c85c (patch) | |
tree | 2ef5dc7c6083cc8f04f0bdb7fb624817424c0210 | |
parent | 7d26c479eebec03c2abb28f7b5226791688a7cea (diff) | |
download | stable-diffusion-webui-gfx803-7870937c770aaba9e681c299f923ba645163c85c.tar.gz stable-diffusion-webui-gfx803-7870937c770aaba9e681c299f923ba645163c85c.tar.bz2 stable-diffusion-webui-gfx803-7870937c770aaba9e681c299f923ba645163c85c.zip |
XYZ always_discard_next_to_last_sigma
Co-authored-by: Franck Mahon <franck.mahon@gmail.com>
-rw-r--r-- | scripts/xyz_grid.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index 7821cc65..ee30747c 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -144,11 +144,18 @@ def apply_face_restore(p, opt, x): p.restore_faces = is_active
-def apply_override(field):
+def apply_override(field, boolean: bool = False):
def fun(p, x, xs):
+ if boolean:
+ x = True if x == "True" else False
p.override_settings[field] = x
return fun
+
+def boolean_choice():
+ return ["True", "False"]
+
+
def format_value_add_label(p, opt, x):
if type(x) == float:
x = round(x, 8)
@@ -235,6 +242,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),
]
|