From 96bf89f782376544f4f7f20492c5ae0d6a82001f Mon Sep 17 00:00:00 2001 From: Vishvesh Khanvilkar <158825962+khanvilkarvishvesh@users.noreply.github.com> Date: Fri, 17 May 2024 20:48:45 +0530 Subject: [PATCH 1/3] fix: use correct border radius css property (#2845) --- css/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/style.css b/css/style.css index c702a725..b9e6e2ce 100644 --- a/css/style.css +++ b/css/style.css @@ -391,6 +391,6 @@ progress::after { background-color: #fff8; font-family: monospace; text-align: center; - border-radius-top: 5px; + border-radius: 5px 5px 0px 0px; display: none; /* remove this to enable tooltip in preview image */ } \ No newline at end of file From 5e594685e1f86ffaf4b10d6ca7f11742daca4a84 Mon Sep 17 00:00:00 2001 From: e52fa787 <31095594+e52fa787@users.noreply.github.com> Date: Fri, 17 May 2024 23:25:56 +0800 Subject: [PATCH 2/3] fix: do not close meta tag in HTML header (#2740) * fixed typo in HTML (extra tag) * refactor: remove closing slash for meta tag as of specification in https://html.com/tags/meta/, meta tagas are null elements: This element must not contain any content, and does not need a closing tag. --------- Co-authored-by: Manuel Schmid <9307310+mashb1t@users.noreply.github.com> --- modules/ui_gradio_extensions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui_gradio_extensions.py b/modules/ui_gradio_extensions.py index bebf9f8c..409c7e33 100644 --- a/modules/ui_gradio_extensions.py +++ b/modules/ui_gradio_extensions.py @@ -39,7 +39,7 @@ def javascript_html(): head += f'\n' head += f'\n' head += f'\n' - head += f'\n' + head += f'\n' if args_manager.args.theme: head += f'\n' From 33fa175bd438041fe4ae715adc9a06d025a940b3 Mon Sep 17 00:00:00 2001 From: Manuel Schmid <9307310+mashb1t@users.noreply.github.com> Date: Fri, 17 May 2024 18:25:08 +0200 Subject: [PATCH 3/3] feat: automatically describe image on uov image upload (#1938) * feat: automatically describe image on uov image upload if prompt is empty * feat: add argument to disable automatic uov image description * feat: rename argument, disable by default this prevents computers with low hardware specifications from being unnecessary blocked --- args_manager.py | 3 +++ webui.py | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/args_manager.py b/args_manager.py index 6a3ae9dc..e023da27 100644 --- a/args_manager.py +++ b/args_manager.py @@ -31,6 +31,9 @@ args_parser.parser.add_argument("--disable-metadata", action='store_true', args_parser.parser.add_argument("--disable-preset-download", action='store_true', help="Disables downloading models for presets", default=False) +args_parser.parser.add_argument("--enable-describe-uov-image", action='store_true', + help="Disables automatic description of uov images when prompt is empty", default=False) + args_parser.parser.add_argument("--always-download-new-model", action='store_true', help="Always download newer models ", default=False) diff --git a/webui.py b/webui.py index 85b2c0df..f99ab159 100644 --- a/webui.py +++ b/webui.py @@ -717,6 +717,15 @@ with shared.gradio_root: desc_btn.click(trigger_describe, inputs=[desc_method, desc_input_image], outputs=[prompt, style_selections], show_progress=True, queue=True) + if args_manager.args.enable_describe_uov_image: + def trigger_uov_describe(mode, img, prompt): + # keep prompt if not empty + if prompt == '': + return trigger_describe(mode, img) + return gr.update(), gr.update() + + uov_input_image.upload(trigger_uov_describe, inputs=[desc_method, uov_input_image, prompt], + outputs=[prompt, style_selections], show_progress=True, queue=True) def dump_default_english_config(): from modules.localization import dump_english_config