aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpapuSpartan <30642826+papuSpartan@users.noreply.github.com>2023-05-03 13:12:43 -0500
committerpapuSpartan <30642826+papuSpartan@users.noreply.github.com>2023-05-03 13:12:43 -0500
commite960781511eb175943be09b314ac2be46b6fc684 (patch)
tree1441d54859f012f87f624fda7170788cebc4960a
parentf08ae961157d33051b5cd09ba5c77b779096ef69 (diff)
fix maximum downsampling option
-rw-r--r--modules/generation_parameters_copypaste.py4
-rw-r--r--modules/processing.py1
-rw-r--r--modules/shared.py5
3 files changed, 5 insertions, 5 deletions
diff --git a/modules/generation_parameters_copypaste.py b/modules/generation_parameters_copypaste.py
index 34c1b860..83382e93 100644
--- a/modules/generation_parameters_copypaste.py
+++ b/modules/generation_parameters_copypaste.py
@@ -306,6 +306,8 @@ Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 965400086, Size: 512x512, Model
res["Token merging stride x"] = '2'
if res.get("Token merging stride y", None) is None:
res["Token merging stride y"] = '2'
+ if res.get("Token merging maximum down sampling", None) is None:
+ res["Token merging maximum down sampling"] = '1'
restore_old_hires_fix_params(res)
@@ -341,7 +343,7 @@ infotext_to_setting_name_mapping = [
('Token merging merge attention', 'token_merging_merge_attention'),
('Token merging merge cross attention', 'token_merging_merge_cross_attention'),
('Token merging merge mlp', 'token_merging_merge_mlp'),
- ('Token merging maximum downsampling', 'token_merging_maximum_downsampling'),
+ ('Token merging maximum down sampling', 'token_merging_maximum_down_sampling'),
('Token merging stride x', 'token_merging_stride_x'),
('Token merging stride y', 'token_merging_stride_y'),
('RNG', 'randn_source'),
diff --git a/modules/processing.py b/modules/processing.py
index d5d1da5a..6807a301 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -495,6 +495,7 @@ def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments=None, iter
"Token merging merge mlp": None if opts.token_merging_merge_mlp is False else opts.token_merging_merge_mlp,
"Token merging stride x": None if opts.token_merging_stride_x == 2 else opts.token_merging_stride_x,
"Token merging stride y": None if opts.token_merging_stride_y == 2 else opts.token_merging_stride_y,
+ "Token merging maximum down sampling": None if opts.token_merging_maximum_down_sampling == 1 else opts.token_merging_maximum_down_sampling,
"Init image hash": getattr(p, 'init_img_hash', None),
"RNG": opts.randn_source if opts.randn_source != "GPU" else None,
"NGMS": None if p.s_min_uncond == 0 else p.s_min_uncond,
diff --git a/modules/shared.py b/modules/shared.py
index 7b81ffc9..a7a72dd5 100644
--- a/modules/shared.py
+++ b/modules/shared.py
@@ -488,10 +488,7 @@ options_templates.update(options_section(('token_merging', 'Token Merging'), {
False, "Merge mlp",
gr.Checkbox
),
- "token_merging_maximum_down_sampling": OptionInfo(
- 1, "Maximum down sampling",
- gr.Dropdown, lambda: {"choices": ["1", "2", "4", "8"]}
- ),
+ "token_merging_maximum_down_sampling": OptionInfo(1, "Maximum down sampling", gr.Radio, lambda: {"choices": ['1', '2', '4', '8']}),
"token_merging_stride_x": OptionInfo(
2, "Stride - X",
gr.Slider, {"minimum": 2, "maximum": 8, "step": 2}