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.
This commit is contained in:
Gary Wolfe 2024-12-24 23:36:12 -05:00
parent 572b0329cf
commit ad06e345c9

View File

@ -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) {