Slightly more compact ui settings

Changed Radio to Dropdown.
This commit is contained in:
Alexdnk 2024-03-21 12:52:29 +07:00
parent 978267f461
commit d4d5e4c3a7

View File

@ -257,22 +257,25 @@ with shared.gradio_root:
with gr.Column(scale=1, visible=modules.config.default_advanced_checkbox) as advanced_column: with gr.Column(scale=1, visible=modules.config.default_advanced_checkbox) as advanced_column:
with gr.Tab(label='Setting'): with gr.Tab(label='Setting'):
if not args_manager.args.disable_preset_selection: with gr.Row():
preset_selection = gr.Radio(label='Preset', if not args_manager.args.disable_preset_selection:
choices=modules.config.available_presets, preset_selection = gr.Dropdown(label='Preset',
value=args_manager.args.preset if args_manager.args.preset else "initial", choices=modules.config.available_presets,
interactive=True) value=args_manager.args.preset if args_manager.args.preset else "initial",
performance_selection = gr.Radio(label='Performance', interactive=True, scale=3)
choices=flags.Performance.list(), performance_selection = gr.Dropdown(label='Performance',
value=modules.config.default_performance) choices=flags.Performance.list(),
aspect_ratios_selection = gr.Radio(label='Aspect Ratios', choices=modules.config.available_aspect_ratios, value=modules.config.default_performance, scale=1)
value=modules.config.default_aspect_ratio, info='width × height', with gr.Accordion('Resolution'):
elem_classes='aspect_ratios') aspect_ratios_selection = gr.Radio(label='Aspect Ratios', choices=modules.config.available_aspect_ratios,
image_number = gr.Slider(label='Image Number', minimum=1, maximum=modules.config.default_max_image_number, step=1, value=modules.config.default_image_number) value=modules.config.default_aspect_ratio, info='width × height',
elem_classes='aspect_ratios')
output_format = gr.Radio(label='Output Format', with gr.Row():
choices=flags.OutputFormat.list(), output_format = gr.Dropdown(label='Output Format',
value=modules.config.default_output_format) choices=flags.OutputFormat.list(),
value=modules.config.default_output_format, scale=1)
image_number = gr.Slider(label='Image Number', minimum=1, maximum=modules.config.default_max_image_number, step=1, value=modules.config.default_image_number, scale=3)
negative_prompt = gr.Textbox(label='Negative Prompt', show_label=True, placeholder="Type prompt here.", negative_prompt = gr.Textbox(label='Negative Prompt', show_label=True, placeholder="Type prompt here.",
info='Describing what you do not want to see.', lines=2, info='Describing what you do not want to see.', lines=2,