diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-05-10 04:52:45 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-05-10 04:52:45 +0000 |
commit | 762265eab58cdb8f2d6398769bab43d8b8db0075 (patch) | |
tree | 7766901f867d84cf0662b2ae0d5bc55c673a08e8 /modules/ui.py | |
parent | a617d6488275a58da0627b3fed5f53593b2eb8b2 (diff) | |
download | stable-diffusion-webui-gfx803-762265eab58cdb8f2d6398769bab43d8b8db0075.tar.gz stable-diffusion-webui-gfx803-762265eab58cdb8f2d6398769bab43d8b8db0075.tar.bz2 stable-diffusion-webui-gfx803-762265eab58cdb8f2d6398769bab43d8b8db0075.zip |
autofixes from ruff
Diffstat (limited to 'modules/ui.py')
-rw-r--r-- | modules/ui.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/modules/ui.py b/modules/ui.py index d02f6e82..2171f3aa 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -246,7 +246,7 @@ def connect_reuse_seed(seed: gr.Number, reuse_seed: gr.Button, generation_info: all_seeds = gen_info.get('all_seeds', [-1])
res = all_seeds[index if 0 <= index < len(all_seeds) else 0]
- except json.decoder.JSONDecodeError as e:
+ except json.decoder.JSONDecodeError:
if gen_info_string != '':
print("Error parsing JSON generation info:", file=sys.stderr)
print(gen_info_string, file=sys.stderr)
@@ -736,8 +736,8 @@ 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." +
- f"<br>Use an empty output directory to save pictures normally instead of writing to the output directory." +
+ "<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." +
f"<br>Add inpaint batch mask directory to enable inpaint batch processing."
f"{hidden}</p>"
)
@@ -746,7 +746,6 @@ def create_ui(): 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")
img2img_tabs = [tab_img2img, tab_sketch, tab_inpaint, tab_inpaint_color, tab_inpaint_upload, tab_batch]
- img2img_image_inputs = [init_img, sketch, init_img_with_mask, inpaint_color_sketch]
for i, tab in enumerate(img2img_tabs):
tab.select(fn=lambda tabnum=i: tabnum, inputs=[], outputs=[img2img_selected_tab])
@@ -1290,8 +1289,8 @@ def create_ui(): with gr.Column(elem_id='ti_gallery_container'):
ti_output = gr.Text(elem_id="ti_output", value="", show_label=False)
- ti_gallery = gr.Gallery(label='Output', show_label=False, elem_id='ti_gallery').style(columns=4)
- ti_progress = gr.HTML(elem_id="ti_progress", value="")
+ gr.Gallery(label='Output', show_label=False, elem_id='ti_gallery').style(columns=4)
+ gr.HTML(elem_id="ti_progress", value="")
ti_outcome = gr.HTML(elem_id="ti_error", value="")
create_embedding.click(
@@ -1668,7 +1667,7 @@ def create_ui(): interface.render()
if os.path.exists(os.path.join(script_path, "notification.mp3")):
- audio_notification = gr.Audio(interactive=False, value=os.path.join(script_path, "notification.mp3"), elem_id="audio_notification", visible=False)
+ gr.Audio(interactive=False, value=os.path.join(script_path, "notification.mp3"), elem_id="audio_notification", visible=False)
footer = shared.html("footer.html")
footer = footer.format(versions=versions_html())
|