From 64c29a8c4340bb11c1104c8d1088d9a91bbd0da9 Mon Sep 17 00:00:00 2001 From: Manuel Schmid <9307310+mashb1t@users.noreply.github.com> Date: Thu, 30 May 2024 16:17:36 +0200 Subject: [PATCH] feat: rework intermediate image display for restricted performances (#3050) disable intermediate results for all performacnes with restricted features make disable_intermediate_results interactive again even if performance has restricted features users who want to disable this option should be able to do so, even if performance will be impacted --- webui.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/webui.py b/webui.py index 6f08757d..fe33560b 100644 --- a/webui.py +++ b/webui.py @@ -460,9 +460,8 @@ with shared.gradio_root: disable_preview = gr.Checkbox(label='Disable Preview', value=modules.config.default_black_out_nsfw, interactive=not modules.config.default_black_out_nsfw, info='Disable preview during generation.') - disable_intermediate_results = gr.Checkbox(label='Disable Intermediate Results', + disable_intermediate_results = gr.Checkbox(label='Disable Intermediate Results', value=flags.Performance.has_restricted_features(modules.config.default_performance), - interactive=not flags.Performance.has_restricted_features(modules.config.default_performance), info='Disable intermediate results during generation, only show final gallery.') disable_seed_increment = gr.Checkbox(label='Disable seed increment', info='Disable automatic seed increment when image number is > 1.', @@ -616,7 +615,7 @@ with shared.gradio_root: performance_selection.change(lambda x: [gr.update(interactive=not flags.Performance.has_restricted_features(x))] * 11 + [gr.update(visible=not flags.Performance.has_restricted_features(x))] * 1 + - [gr.update(interactive=not flags.Performance.has_restricted_features(x), value=flags.Performance.has_restricted_features(x))] * 1, + [gr.update(value=flags.Performance.has_restricted_features(x))] * 1, inputs=performance_selection, outputs=[ guidance_scale, sharpness, adm_scaler_end, adm_scaler_positive,