Update webui.py
Browse files
webui.py
CHANGED
@@ -195,20 +195,20 @@ with shared.gradio_root:
|
|
195 |
outputs=ip_ad_cols + ip_types + ip_stops + ip_weights,
|
196 |
queue=False, show_progress=False)
|
197 |
with gr.TabItem(label='Inpaint or Outpaint') as inpaint_tab:
|
198 |
-
with gr.Row():
|
199 |
inpaint_mask_upload_checkbox = gr.Checkbox(label='Enable Mask Upload', value=False)
|
200 |
invert_mask_checkbox = gr.Checkbox(label='Invert Mask', value=False)
|
201 |
|
202 |
-
with gr.Row():
|
203 |
-
inpaint_input_image = grh.Image(label='Drag inpaint or outpaint image to here', source='upload', type='numpy', tool='sketch', height=500, brush_color="#FFFFFF", elem_id='inpaint_canvas')
|
204 |
-
inpaint_mask_image = grh.Image(label='Mask Upload', source='upload', type='numpy', height=500, visible=False)
|
205 |
-
|
206 |
-
with gr.Row():
|
207 |
inpaint_additional_prompt = gr.Textbox(placeholder="Describe what you want to inpaint.", elem_id='inpaint_additional_prompt', label='Inpaint Additional Prompt', visible=False, show_copy_button=True)
|
208 |
outpaint_selections = gr.CheckboxGroup(choices=['Left', 'Right', 'Top', 'Bottom'], value=[], label='Outpaint Direction')
|
209 |
inpaint_mode = gr.Dropdown(choices=modules.flags.inpaint_options, value=modules.flags.inpaint_option_default, label='Method')
|
210 |
-
|
211 |
-
|
|
|
|
|
|
|
|
|
|
|
212 |
with gr.TabItem(label='Describe') as desc_tab:
|
213 |
with gr.Row():
|
214 |
with gr.Column():
|
@@ -253,7 +253,7 @@ with shared.gradio_root:
|
|
253 |
ip_tab.select(lambda: 'ip', outputs=current_tab, queue=False, _js=down_js, show_progress=False)
|
254 |
desc_tab.select(lambda: 'desc', outputs=current_tab, queue=False, _js=down_js, show_progress=False)
|
255 |
|
256 |
-
with gr.Column(scale=1, visible=False) as advanced_column:
|
257 |
with gr.Tab(label='Setting'):
|
258 |
performance_selection = gr.Radio(label='Performance',
|
259 |
choices=modules.flags.performance_selections,
|
@@ -471,7 +471,7 @@ with shared.gradio_root:
|
|
471 |
step=1, value=128)
|
472 |
|
473 |
with gr.Tab(label='Inpaint'):
|
474 |
-
debugging_inpaint_preprocessor = gr.Checkbox(label='Debug Inpaint Preprocessing', value=
|
475 |
inpaint_disable_initial_latent = gr.Checkbox(label='Disable initial latent in inpaint', value=False)
|
476 |
inpaint_engine = gr.Dropdown(label='Inpaint Engine',
|
477 |
value=modules.config.default_inpaint_engine_version,
|
@@ -494,7 +494,7 @@ with shared.gradio_root:
|
|
494 |
info='Positive value will make white area in the mask larger, '
|
495 |
'negative value will make white area smaller.'
|
496 |
'(default is 0, always process before any mask invert)')
|
497 |
-
# inpaint_mask_upload_checkbox = gr.Checkbox(label='Enable Mask Upload', value=
|
498 |
# invert_mask_checkbox = gr.Checkbox(label='Invert Mask', value=False)
|
499 |
|
500 |
inpaint_ctrls = [debugging_inpaint_preprocessor, inpaint_disable_initial_latent, inpaint_engine,
|
|
|
195 |
outputs=ip_ad_cols + ip_types + ip_stops + ip_weights,
|
196 |
queue=False, show_progress=False)
|
197 |
with gr.TabItem(label='Inpaint or Outpaint') as inpaint_tab:
|
198 |
+
with gr.Row(elem_id="IoOFixed"):
|
199 |
inpaint_mask_upload_checkbox = gr.Checkbox(label='Enable Mask Upload', value=False)
|
200 |
invert_mask_checkbox = gr.Checkbox(label='Invert Mask', value=False)
|
201 |
|
|
|
|
|
|
|
|
|
|
|
202 |
inpaint_additional_prompt = gr.Textbox(placeholder="Describe what you want to inpaint.", elem_id='inpaint_additional_prompt', label='Inpaint Additional Prompt', visible=False, show_copy_button=True)
|
203 |
outpaint_selections = gr.CheckboxGroup(choices=['Left', 'Right', 'Top', 'Bottom'], value=[], label='Outpaint Direction')
|
204 |
inpaint_mode = gr.Dropdown(choices=modules.flags.inpaint_options, value=modules.flags.inpaint_option_default, label='Method')
|
205 |
+
example_inpaint_prompts = gr.Dataset(samples=modules.config.example_inpaint_prompts, label='Additional Prompt Quick List', components=[inpaint_additional_prompt], visible=False)
|
206 |
+
example_inpaint_prompts.click(lambda x: x[0], inputs=example_inpaint_prompts, outputs=inpaint_additional_prompt, show_progress=False, queue=False)
|
207 |
+
|
208 |
+
with gr.Row():
|
209 |
+
inpaint_input_image = grh.Image(label='Drag inpaint or outpaint image to here', source='upload', type='numpy', tool='sketch', height=500, brush_color="#FFFFFF", elem_id='inpaint_canvas')
|
210 |
+
inpaint_mask_image = grh.Image(label='Mask Upload', source='upload', type='numpy', height=500, visible=False)
|
211 |
+
|
212 |
with gr.TabItem(label='Describe') as desc_tab:
|
213 |
with gr.Row():
|
214 |
with gr.Column():
|
|
|
253 |
ip_tab.select(lambda: 'ip', outputs=current_tab, queue=False, _js=down_js, show_progress=False)
|
254 |
desc_tab.select(lambda: 'desc', outputs=current_tab, queue=False, _js=down_js, show_progress=False)
|
255 |
|
256 |
+
with gr.Column(scale=1, visible=False, elem_id="advancedSettingDC") as advanced_column:
|
257 |
with gr.Tab(label='Setting'):
|
258 |
performance_selection = gr.Radio(label='Performance',
|
259 |
choices=modules.flags.performance_selections,
|
|
|
471 |
step=1, value=128)
|
472 |
|
473 |
with gr.Tab(label='Inpaint'):
|
474 |
+
debugging_inpaint_preprocessor = gr.Checkbox(label='Debug Inpaint Preprocessing', value=False)
|
475 |
inpaint_disable_initial_latent = gr.Checkbox(label='Disable initial latent in inpaint', value=False)
|
476 |
inpaint_engine = gr.Dropdown(label='Inpaint Engine',
|
477 |
value=modules.config.default_inpaint_engine_version,
|
|
|
494 |
info='Positive value will make white area in the mask larger, '
|
495 |
'negative value will make white area smaller.'
|
496 |
'(default is 0, always process before any mask invert)')
|
497 |
+
# inpaint_mask_upload_checkbox = gr.Checkbox(label='Enable Mask Upload', value=False)
|
498 |
# invert_mask_checkbox = gr.Checkbox(label='Invert Mask', value=False)
|
499 |
|
500 |
inpaint_ctrls = [debugging_inpaint_preprocessor, inpaint_disable_initial_latent, inpaint_engine,
|