feat: add config for default_developer_debug_mode_checkbox

This commit is contained in:
Manuel Schmid 2024-07-27 20:36:11 +02:00
parent f826bc16f7
commit c247f114d7
No known key found for this signature in database
GPG Key ID: 32C4F7569B40B84B
2 changed files with 8 additions and 2 deletions

View File

@ -439,6 +439,12 @@ default_invert_mask_checkbox = get_config_item_or_set_default(
validator=lambda x: isinstance(x, bool),
expected_type=bool
)
default_developer_debug_mode_checkbox = get_config_item_or_set_default(
key='default_developer_debug_mode_checkbox',
default_value=False,
validator=lambda x: isinstance(x, bool),
expected_type=bool
)
default_max_image_number = get_config_item_or_set_default(
key='default_max_image_number',
default_value=32,

View File

@ -693,9 +693,9 @@ with shared.gradio_root:
value=modules.config.default_sample_sharpness,
info='Higher value means image and texture are sharper.')
gr.HTML('<a href="https://github.com/lllyasviel/Fooocus/discussions/117" target="_blank">\U0001F4D4 Documentation</a>')
dev_mode = gr.Checkbox(label='Developer Debug Mode', value=False, container=False)
dev_mode = gr.Checkbox(label='Developer Debug Mode', value=modules.config.default_developer_debug_mode_checkbox, container=False)
with gr.Column(visible=False) as dev_tools:
with gr.Column(visible=modules.config.default_developer_debug_mode_checkbox) as dev_tools:
with gr.Tab(label='Debug Tools'):
adm_scaler_positive = gr.Slider(label='Positive ADM Guidance Scaler', minimum=0.1, maximum=3.0,
step=0.001, value=1.5, info='The scaler multiplied to positive ADM (use 1.0 to disable). ')