mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
feat: add config for default_image_prompt_advanced_checkbox
This commit is contained in:
@@ -421,6 +421,12 @@ default_advanced_checkbox = get_config_item_or_set_default(
|
|||||||
validator=lambda x: isinstance(x, bool),
|
validator=lambda x: isinstance(x, bool),
|
||||||
expected_type=bool
|
expected_type=bool
|
||||||
)
|
)
|
||||||
|
default_image_prompt_advanced_checkbox = get_config_item_or_set_default(
|
||||||
|
key='default_image_prompt_advanced_checkbox',
|
||||||
|
default_value=False,
|
||||||
|
validator=lambda x: isinstance(x, bool),
|
||||||
|
expected_type=bool
|
||||||
|
)
|
||||||
default_max_image_number = get_config_item_or_set_default(
|
default_max_image_number = get_config_item_or_set_default(
|
||||||
key='default_max_image_number',
|
key='default_max_image_number',
|
||||||
default_value=32,
|
default_value=32,
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ with shared.gradio_root:
|
|||||||
ip_image = grh.Image(label='Image', source='upload', type='numpy', show_label=False, height=300)
|
ip_image = grh.Image(label='Image', source='upload', type='numpy', show_label=False, height=300)
|
||||||
ip_images.append(ip_image)
|
ip_images.append(ip_image)
|
||||||
ip_ctrls.append(ip_image)
|
ip_ctrls.append(ip_image)
|
||||||
with gr.Column(visible=False) as ad_col:
|
with gr.Column(visible=modules.config.default_image_prompt_advanced_checkbox) as ad_col:
|
||||||
with gr.Row():
|
with gr.Row():
|
||||||
default_end, default_weight = flags.default_parameters[flags.default_ip]
|
default_end, default_weight = flags.default_parameters[flags.default_ip]
|
||||||
|
|
||||||
@@ -243,7 +243,7 @@ with shared.gradio_root:
|
|||||||
|
|
||||||
ip_type.change(lambda x: flags.default_parameters[x], inputs=[ip_type], outputs=[ip_stop, ip_weight], queue=False, show_progress=False)
|
ip_type.change(lambda x: flags.default_parameters[x], inputs=[ip_type], outputs=[ip_stop, ip_weight], queue=False, show_progress=False)
|
||||||
ip_ad_cols.append(ad_col)
|
ip_ad_cols.append(ad_col)
|
||||||
ip_advanced = gr.Checkbox(label='Advanced', value=False, container=False)
|
ip_advanced = gr.Checkbox(label='Advanced', value=modules.config.default_image_prompt_advanced_checkbox, container=False)
|
||||||
gr.HTML('* \"Image Prompt\" is powered by Fooocus Image Mixture Engine (v1.0.1). <a href="https://github.com/lllyasviel/Fooocus/discussions/557" target="_blank">\U0001F4D4 Documentation</a>')
|
gr.HTML('* \"Image Prompt\" is powered by Fooocus Image Mixture Engine (v1.0.1). <a href="https://github.com/lllyasviel/Fooocus/discussions/557" target="_blank">\U0001F4D4 Documentation</a>')
|
||||||
|
|
||||||
def ip_advance_checked(x):
|
def ip_advance_checked(x):
|
||||||
|
|||||||
Reference in New Issue
Block a user