diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-04-29 15:21:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-29 15:21:28 +0000 |
commit | b615a2ed11b4d8f9345ae89c3e65c3fe5b24b244 (patch) | |
tree | d7cf112e8c6f0df2fb4646d8953e80fcb0812d4f /javascript/ui.js | |
parent | 103fc062a5edb8e5a8e79099cc3f80c75c4158af (diff) | |
parent | eabecc21ecd240b63cd4b3996286b74e794ddcea (diff) | |
download | stable-diffusion-webui-gfx803-b615a2ed11b4d8f9345ae89c3e65c3fe5b24b244.tar.gz stable-diffusion-webui-gfx803-b615a2ed11b4d8f9345ae89c3e65c3fe5b24b244.tar.bz2 stable-diffusion-webui-gfx803-b615a2ed11b4d8f9345ae89c3e65c3fe5b24b244.zip |
Merge pull request #9108 from AUTOMATIC1111/img2img-scale-by
add "resize by" and "resize to" tabs to img2img
Diffstat (limited to 'javascript/ui.js')
-rw-r--r-- | javascript/ui.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/javascript/ui.js b/javascript/ui.js index 4a440193..dc538231 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -361,3 +361,8 @@ function selectCheckpoint(name){ desiredCheckpointName = name; gradioApp().getElementById('change_checkpoint').click() } + +function currentImg2imgSourceResolution(_, _, scaleBy){ + var img = gradioApp().querySelector('#mode_img2img > div[style="display: block;"] img') + return img ? [img.naturalWidth, img.naturalHeight, scaleBy] : [0, 0, scaleBy] +} |