diff options
author | w-e-w <40751091+w-e-w@users.noreply.github.com> | 2023-05-15 17:02:51 +0000 |
---|---|---|
committer | w-e-w <40751091+w-e-w@users.noreply.github.com> | 2023-05-15 17:02:51 +0000 |
commit | 9e9090753255746cec7b3cb522a2f8c12b38728a (patch) | |
tree | 8ffd01bf96876d45fb3cc8369ca4527726816d4b /scripts/xyz_grid.py | |
parent | f6a2a98f1a406389da266ecc993da84d2ecef432 (diff) | |
download | stable-diffusion-webui-gfx803-9e9090753255746cec7b3cb522a2f8c12b38728a.tar.gz stable-diffusion-webui-gfx803-9e9090753255746cec7b3cb522a2f8c12b38728a.tar.bz2 stable-diffusion-webui-gfx803-9e9090753255746cec7b3cb522a2f8c12b38728a.zip |
xyz token merging
Diffstat (limited to 'scripts/xyz_grid.py')
-rw-r--r-- | scripts/xyz_grid.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index 5672267d..da820b39 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -144,6 +144,11 @@ def apply_face_restore(p, opt, x): p.restore_faces = is_active
+def apply_override(field):
+ def fun(p, x, xs):
+ p.override_settings[field] = x
+ return fun
+
def format_value_add_label(p, opt, x):
if type(x) == float:
x = round(x, 8)
@@ -224,6 +229,8 @@ axis_options = [ AxisOption("Styles", str, apply_styles, choices=lambda: list(shared.prompt_styles.styles)),
AxisOption("UniPC Order", int, apply_uni_pc_order, cost=0.5),
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')),
]
|