Merge branch 'dev' into feature/restore-progress

This commit is contained in:
AUTOMATIC1111
2023-04-29 22:13:40 +03:00
committed by GitHub
63 changed files with 1387 additions and 327 deletions

View File

@@ -386,4 +386,21 @@ function restoreProgress (task_tag) {
res[0] = 0
return res
}
}
function currentImg2imgSourceResolution(_, _, scaleBy){
var img = gradioApp().querySelector('#mode_img2img > div[style="display: block;"] img')
return img ? [img.naturalWidth, img.naturalHeight, scaleBy] : [0, 0, scaleBy]
}
function updateImg2imgResizeToTextAfterChangingImage(){
// At the time this is called from gradio, the image has no yet been replaced.
// There may be a better solution, but this is simple and straightforward so I'm going with it.
setTimeout(function() {
gradioApp().getElementById('img2img_update_resize_to').click()
}, 500);
return []
}