mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-06 02:30:30 -08:00
add "resize by" and "resize to" tabs to img2img
This commit is contained in:
parent
3856ada5cc
commit
d667fc435f
4 changed files with 75 additions and 5 deletions
|
|
@ -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]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue