From 6675849a4929d1ef0c6c75ecaf73307d5070cc08 Mon Sep 17 00:00:00 2001 From: Seki <73173305+S-Tubasa@users.noreply.github.com> Date: Fri, 23 Sep 2022 12:40:39 +0900 Subject: [PATCH 1/2] add extrastab send to img2img --- modules/ui.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/ui.py b/modules/ui.py index 036f2ed3a00..6f104f6f541 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -752,6 +752,7 @@ def create_ui(txt2img, img2img, run_extras, run_pnginfo): result_images = gr.Gallery(label="Result", show_label=False) html_info_x = gr.HTML() html_info = gr.HTML() + extras_send_to_img2img = gr.Button('Send to img2img') submit.click( fn=run_extras, @@ -774,6 +775,13 @@ def create_ui(txt2img, img2img, run_extras, run_pnginfo): html_info, ] ) + + extras_send_to_img2img.click( + fn=lambda x: image_from_url_text(x), + _js="extract_image_from_gallery_img2img", + inputs=[result_images], + outputs=[init_img], + ) pnginfo_interface = gr.Interface( wrap_gradio_call(run_pnginfo), From 600bd55c5711fcae943910f62381007b6874079c Mon Sep 17 00:00:00 2001 From: Seki <73173305+S-Tubasa@users.noreply.github.com> Date: Fri, 23 Sep 2022 20:17:23 +0900 Subject: [PATCH 2/2] add extrastab send to inpaint --- modules/ui.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/ui.py b/modules/ui.py index 6f104f6f541..7ac285ac707 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -753,6 +753,7 @@ def create_ui(txt2img, img2img, run_extras, run_pnginfo): html_info_x = gr.HTML() html_info = gr.HTML() extras_send_to_img2img = gr.Button('Send to img2img') + extras_send_to_inpaint = gr.Button('Send to inpaint') submit.click( fn=run_extras, @@ -782,6 +783,13 @@ def create_ui(txt2img, img2img, run_extras, run_pnginfo): inputs=[result_images], outputs=[init_img], ) + + extras_send_to_inpaint.click( + fn=lambda x: image_from_url_text(x), + _js="extract_image_from_gallery_img2img", + inputs=[result_images], + outputs=[init_img_with_mask], + ) pnginfo_interface = gr.Interface( wrap_gradio_call(run_pnginfo),