diff options
author | papuSpartan <30642826+papuSpartan@users.noreply.github.com> | 2023-05-13 15:23:42 +0000 |
---|---|---|
committer | papuSpartan <30642826+papuSpartan@users.noreply.github.com> | 2023-05-13 15:23:42 +0000 |
commit | ac83627a31daac06f4d48b0e7db223ef807fe8e5 (patch) | |
tree | 68d89cf786fa340f87eb7b8c1afe7ccae463ccd2 /modules/shared.py | |
parent | 55e52c878ab669d5b11b001a4152ee1a3b8d4880 (diff) | |
download | stable-diffusion-webui-gfx803-ac83627a31daac06f4d48b0e7db223ef807fe8e5.tar.gz stable-diffusion-webui-gfx803-ac83627a31daac06f4d48b0e7db223ef807fe8e5.tar.bz2 stable-diffusion-webui-gfx803-ac83627a31daac06f4d48b0e7db223ef807fe8e5.zip |
heavily simplify
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 42 |
1 files changed, 4 insertions, 38 deletions
diff --git a/modules/shared.py b/modules/shared.py index 4b346585..0d96c14c 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -459,47 +459,13 @@ 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. This can provide significant speed and memory improvements.",
- gr.Checkbox
- ),
- "token_merging_ratio": OptionInfo(
- 0.5, "Merging Ratio",
- gr.Slider, {"minimum": 0, "maximum": 0.9, "step": 0.1}
- ),
- "token_merging_hr_only": OptionInfo(
- 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.",
+ 0, "Merging Ratio (high-res pass)",
gr.Slider, {"minimum": 0, "maximum": 0.9, "step": 0.1}
),
- # More advanced/niche settings:
- "token_merging_random": OptionInfo(
- False, "Use random perturbations - Can improve outputs for certain samplers. For others, it may cause visual artifacting.",
- gr.Checkbox
- ),
- "token_merging_merge_attention": OptionInfo(
- True, "Merge attention",
- gr.Checkbox
- ),
- "token_merging_merge_cross_attention": OptionInfo(
- False, "Merge cross attention",
- gr.Checkbox
- ),
- "token_merging_merge_mlp": OptionInfo(
- False, "Merge mlp",
- gr.Checkbox
- ),
- "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}
- ),
- "token_merging_stride_y": OptionInfo(
- 2, "Stride - Y",
- gr.Slider, {"minimum": 2, "maximum": 8, "step": 2}
+ "token_merging_ratio": OptionInfo(
+ 0, "Merging Ratio",
+ gr.Slider, {"minimum": 0, "maximum": 0.9, "step": 0.1}
)
}))
|