mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
add default_max_image_number to config, use as maximum in default_image_number
This commit is contained in:
+6
-1
@@ -243,10 +243,15 @@ default_advanced_checkbox = get_config_item_or_set_default(
|
|||||||
default_value=False,
|
default_value=False,
|
||||||
validator=lambda x: isinstance(x, bool)
|
validator=lambda x: isinstance(x, bool)
|
||||||
)
|
)
|
||||||
|
default_max_image_number = get_config_item_or_set_default(
|
||||||
|
key='default_max_image_number',
|
||||||
|
default_value=32,
|
||||||
|
validator=lambda x: isinstance(x, int) and x >= 1
|
||||||
|
)
|
||||||
default_image_number = get_config_item_or_set_default(
|
default_image_number = get_config_item_or_set_default(
|
||||||
key='default_image_number',
|
key='default_image_number',
|
||||||
default_value=2,
|
default_value=2,
|
||||||
validator=lambda x: isinstance(x, int) and 1 <= x <= 32
|
validator=lambda x: isinstance(x, int) and 1 <= x <= default_max_image_number
|
||||||
)
|
)
|
||||||
checkpoint_downloads = get_config_item_or_set_default(
|
checkpoint_downloads = get_config_item_or_set_default(
|
||||||
key='checkpoint_downloads',
|
key='checkpoint_downloads',
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ with shared.gradio_root:
|
|||||||
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')
|
||||||
image_number = gr.Slider(label='Image Number', minimum=1, maximum=32, step=1, value=modules.config.default_image_number)
|
image_number = gr.Slider(label='Image Number', minimum=1, maximum=modules.config.default_max_image_number, step=1, value=modules.config.default_image_number)
|
||||||
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,
|
||||||
elem_id='negative_prompt',
|
elem_id='negative_prompt',
|
||||||
|
|||||||
Reference in New Issue
Block a user