aboutsummaryrefslogtreecommitdiff
path: root/modules/shared.py
diff options
context:
space:
mode:
authorpapuSpartan <macabeg@icloud.com>2023-04-04 02:26:44 -0500
committerpapuSpartan <macabeg@icloud.com>2023-04-04 02:26:44 -0500
commit5c8e53d5e98da0eabf384318955c57842d612c07 (patch)
tree62686f3d064381bb606624f0fc53ea97b5f4e9b4 /modules/shared.py
parentc707b7df95a61b66a05be94e805e1be9a432e294 (diff)
Allow different merge ratios to be used for each pass. Make toggle cmd flag work again. Remove ratio flag. Remove warning about controlnet being incompatible
Diffstat (limited to 'modules/shared.py')
-rw-r--r--modules/shared.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/shared.py b/modules/shared.py
index d7379e24..c7572e98 100644
--- a/modules/shared.py
+++ b/modules/shared.py
@@ -429,7 +429,7 @@ options_templates.update(options_section((None, "Hidden options"), {
options_templates.update(options_section(('token_merging', 'Token Merging'), {
"token_merging": OptionInfo(
- False, "Enable redundant token merging via tomesd. (currently incompatible with controlnet extension)",
+ 0.5, "Enable redundant token merging via tomesd. This can provide significant speed and memory improvements.",
gr.Checkbox
),
"token_merging_ratio": OptionInfo(
@@ -440,6 +440,10 @@ options_templates.update(options_section(('token_merging', 'Token Merging'), {
True, "Apply only to high-res fix pass. Disabling can yield a ~20-35% speedup on contemporary resolutions.",
gr.Checkbox
),
+ "token_merging_ratio_hr": OptionInfo(
+ 0.5, "Merging Ratio (high-res pass) - If 'Apply only to high-res' is enabled, this will always be the ratio used.",
+ gr.Slider, {"minimum": 0, "maximum": 0.9, "step": 0.1}
+ ),
# More advanced/niche settings:
"token_merging_random": OptionInfo(
True, "Use random perturbations - Disabling might help with certain samplers",