diff options
author | Andrii Skaliuk <askaliuk@users.noreply.github.com> | 2023-01-27 17:32:31 -0800 |
---|---|---|
committer | Andrii Skaliuk <askaliuk@users.noreply.github.com> | 2023-01-27 17:32:31 -0800 |
commit | 2aac1d97782b486f3a4a5209cf399dcdcb7bbb4d (patch) | |
tree | 45d2d50fa30d931c3a2b67f346506cb816358925 /modules/ui.py | |
parent | cc8c9b7474d917888a0bd069fcd59a458c67ae4b (diff) |
Basic inpainting batch support
Modifies batch UI to add optional inpainting support
Diffstat (limited to 'modules/ui.py')
-rw-r--r-- | modules/ui.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/ui.py b/modules/ui.py index 85ae62c7..fddb9177 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -691,9 +691,15 @@ def create_ui(): with gr.TabItem('Batch', id='batch', elem_id="img2img_batch_tab") as tab_batch:
hidden = '<br>Disabled when launched with --hide-ui-dir-config.' if shared.cmd_opts.hide_ui_dir_config else ''
- gr.HTML(f"<p style='padding-bottom: 1em;' class=\"text-gray-500\">Process images in a directory on the same machine where the server is running.<br>Use an empty output directory to save pictures normally instead of writing to the output directory.{hidden}</p>")
+ gr.HTML(
+ f"<p style='padding-bottom: 1em;' class=\"text-gray-500\">Process images in a directory on the same machine where the server is running." +
+ f"<br>Use an empty output directory to save pictures normally instead of writing to the output directory." +
+ f"<br>Add inpaint batch mask directory to enable inpaint batch processing."
+ f"{hidden}</p>"
+ )
img2img_batch_input_dir = gr.Textbox(label="Input directory", **shared.hide_dirs, elem_id="img2img_batch_input_dir")
img2img_batch_output_dir = gr.Textbox(label="Output directory", **shared.hide_dirs, elem_id="img2img_batch_output_dir")
+ img2img_batch_inpaint_mask_dir = gr.Textbox(label="Inpaint batch mask directory (required for inpaint batch processing only)", **shared.hide_dirs, elem_id="img2img_batch_inpaint_mask_dir")
def copy_image(img):
if isinstance(img, dict) and 'image' in img:
@@ -838,6 +844,7 @@ def create_ui(): inpainting_mask_invert,
img2img_batch_input_dir,
img2img_batch_output_dir,
+ img2img_batch_inpaint_mask_dir
] + custom_inputs,
outputs=[
img2img_gallery,
|