mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
feat: change preset from option to select, add accordion for resolution
This commit is contained in:
+5
-1
@@ -101,10 +101,14 @@ progress::after {
|
|||||||
overflow: auto !important;
|
overflow: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.aspect_ratios label {
|
.performance_selection label {
|
||||||
width: 140px !important;
|
width: 140px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.aspect_ratios label {
|
||||||
|
flex: calc(50% - 5px) !important;
|
||||||
|
}
|
||||||
|
|
||||||
.aspect_ratios label span {
|
.aspect_ratios label span {
|
||||||
white-space: nowrap !important;
|
white-space: nowrap !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -257,25 +257,24 @@ 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'):
|
||||||
with gr.Row():
|
if not args_manager.args.disable_preset_selection:
|
||||||
if not args_manager.args.disable_preset_selection:
|
preset_selection = gr.Dropdown(label='Preset',
|
||||||
preset_selection = gr.Dropdown(label='Preset',
|
choices=modules.config.available_presets,
|
||||||
choices=modules.config.available_presets,
|
value=args_manager.args.preset if args_manager.args.preset else "initial",
|
||||||
value=args_manager.args.preset if args_manager.args.preset else "initial",
|
interactive=True)
|
||||||
interactive=True, scale=3)
|
performance_selection = gr.Radio(label='Performance',
|
||||||
performance_selection = gr.Dropdown(label='Performance',
|
choices=flags.Performance.list(),
|
||||||
choices=flags.Performance.list(),
|
value=modules.config.default_performance,
|
||||||
value=modules.config.default_performance, scale=1)
|
elem_classes=['performance_selection'])
|
||||||
with gr.Accordion('Resolution'):
|
with gr.Accordion('Resolution', open=False):
|
||||||
aspect_ratios_selection = gr.Radio(label='Aspect Ratios', choices=modules.config.available_aspect_ratios,
|
aspect_ratios_selection = gr.Radio(label='Aspect Ratios', choices=modules.config.available_aspect_ratios,
|
||||||
value=modules.config.default_aspect_ratio, info='width × height',
|
value=modules.config.default_aspect_ratio, info='width × height',
|
||||||
elem_classes='aspect_ratios')
|
elem_classes='aspect_ratios')
|
||||||
|
|
||||||
with gr.Row():
|
output_format = gr.Radio(label='Output Format',
|
||||||
output_format = gr.Dropdown(label='Output Format',
|
choices=flags.OutputFormat.list(),
|
||||||
choices=flags.OutputFormat.list(),
|
value=modules.config.default_output_format)
|
||||||
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)
|
||||||
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,
|
||||||
|
|||||||
Reference in New Issue
Block a user