Commit 3c81d184 authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub

Merge pull request #10414 from AUTOMATIC1111/xyz-token-merging

xyz token merging
parents 76ebf750 9e909075
...@@ -144,6 +144,11 @@ def apply_face_restore(p, opt, x): ...@@ -144,6 +144,11 @@ def apply_face_restore(p, opt, x):
p.restore_faces = is_active 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): def format_value_add_label(p, opt, x):
if type(x) == float: if type(x) == float:
x = round(x, 8) x = round(x, 8)
...@@ -224,6 +229,8 @@ axis_options = [ ...@@ -224,6 +229,8 @@ axis_options = [
AxisOption("Styles", str, apply_styles, choices=lambda: list(shared.prompt_styles.styles)), AxisOption("Styles", str, apply_styles, choices=lambda: list(shared.prompt_styles.styles)),
AxisOption("UniPC Order", int, apply_uni_pc_order, cost=0.5), AxisOption("UniPC Order", int, apply_uni_pc_order, cost=0.5),
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 high-res", float, apply_override('token_merging_ratio_hr')),
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment