aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ui_common.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-03-11 13:44:20 +0000
committerGitHub <noreply@github.com>2023-03-11 13:44:20 +0000
commit76bc72116e2576b887e3ec8619c9c0f54a151f7a (patch)
tree8fac1a81e1cfec802e7de819470f94b85d3670b3 /modules/ui_common.py
parentef9efb61aa1e0500ffc522b97d072a490ff54788 (diff)
parent7df7e4d22796fda11629463f2fcbe859b98b1d19 (diff)
downloadstable-diffusion-webui-gfx803-76bc72116e2576b887e3ec8619c9c0f54a151f7a.tar.gz
stable-diffusion-webui-gfx803-76bc72116e2576b887e3ec8619c9c0f54a151f7a.tar.bz2
stable-diffusion-webui-gfx803-76bc72116e2576b887e3ec8619c9c0f54a151f7a.zip
Merge pull request #7818 from space-nuko/extension-paste-field-names
Allow extensions to declare paste fields for "Send to X" buttons
Diffstat (limited to 'modules/ui_common.py')
-rw-r--r--modules/ui_common.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/ui_common.py b/modules/ui_common.py
index fd047f31..a12433d2 100644
--- a/modules/ui_common.py
+++ b/modules/ui_common.py
@@ -198,9 +198,16 @@ Requested path was: {f}
html_info = gr.HTML(elem_id=f'html_info_{tabname}')
html_log = gr.HTML(elem_id=f'html_log_{tabname}')
+ paste_field_names = []
+ if tabname == "txt2img":
+ paste_field_names = modules.scripts.scripts_txt2img.paste_field_names
+ elif tabname == "img2img":
+ paste_field_names = modules.scripts.scripts_img2img.paste_field_names
+
for paste_tabname, paste_button in buttons.items():
parameters_copypaste.register_paste_params_button(parameters_copypaste.ParamBinding(
- paste_button=paste_button, tabname=paste_tabname, source_tabname="txt2img" if tabname == "txt2img" else None, source_image_component=result_gallery
+ paste_button=paste_button, tabname=paste_tabname, source_tabname="txt2img" if tabname == "txt2img" else None, source_image_component=result_gallery,
+ paste_field_names=paste_field_names
))
return result_gallery, generation_info if tabname != "extras" else html_info_x, html_info, html_log