diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-14 19:43:01 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-14 19:43:01 +0000 |
commit | 86359535d6fb0899fa9e838d27f2006b929331d5 (patch) | |
tree | 48664577978963392b8d1714b6f49852608bcf58 /javascript | |
parent | f8c512478568293155539f616dce26c5e4495055 (diff) | |
download | stable-diffusion-webui-gfx803-86359535d6fb0899fa9e838d27f2006b929331d5.tar.gz stable-diffusion-webui-gfx803-86359535d6fb0899fa9e838d27f2006b929331d5.tar.bz2 stable-diffusion-webui-gfx803-86359535d6fb0899fa9e838d27f2006b929331d5.zip |
add buttons to copy images between img2img tabs
Diffstat (limited to 'javascript')
-rw-r--r-- | javascript/ui.js | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/javascript/ui.js b/javascript/ui.js index 1e04a8f4..f8279124 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -45,10 +45,27 @@ function switch_to_txt2img(){ return args_to_array(arguments); } -function switch_to_img2img(){ +function switch_to_img2img_tab(no){ gradioApp().querySelector('#tabs').querySelectorAll('button')[1].click(); - gradioApp().getElementById('mode_img2img').querySelectorAll('button')[0].click(); + gradioApp().getElementById('mode_img2img').querySelectorAll('button')[no].click(); +} +function switch_to_img2img(){ + switch_to_img2img_tab(0); + return args_to_array(arguments); +} + +function switch_to_sketch(){ + switch_to_img2img_tab(1); + return args_to_array(arguments); +} + +function switch_to_inpaint(){ + switch_to_img2img_tab(2); + return args_to_array(arguments); +} +function switch_to_inpaint_sketch(){ + switch_to_img2img_tab(3); return args_to_array(arguments); } |