From ad06e345c940d737a38664de7b351731eb1ab7f0 Mon Sep 17 00:00:00 2001 From: Gary Wolfe Date: Tue, 24 Dec 2024 23:36:12 -0500 Subject: [PATCH] Allow new resolutions with Use As Input When Use As Input provides unlisted resolutions, add them first so that they'll be recognized as valid. --- ui/media/js/main.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ui/media/js/main.js b/ui/media/js/main.js index e360ac1a..755bca2f 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -626,15 +626,10 @@ function onUseAsInputClick(req, img) { //Force the image settings size to match the input, as inpaint currently only works correctly //if input image and generate sizes match. - var tempWidth = widthField.value; - var tempHeight = heightField.value; + addImageSizeOption(img.naturalWidth); + addImageSizeOption(img.naturalHeight); widthField.value = img.naturalWidth; heightField.value = img.naturalHeight; - //If it's unhappy with the new values, restore the original values. - if (widthField.value=="" || heightField.value=="") { - widthField.value = tempWidth; - heightField.value = tempHeight; - } } function onUseForControlnetClick(req, img) {