Use the correct size of the image when used as the input. Code credit: @AvidGameFan

This commit is contained in:
cmdr2 2025-02-10 12:49:38 +05:30
parent 7a1e2c4190
commit 26cbc30407

View File

@ -611,6 +611,13 @@ function onUseAsInputClick(req, img) {
initImagePreview.src = imgData
maskSetting.checked = false
//Force the image settings size to match the input, as inpaint currently only works correctly
//if input image and generate sizes match.
addImageSizeOption(img.naturalWidth);
addImageSizeOption(img.naturalHeight);
widthField.value = img.naturalWidth;
heightField.value = img.naturalHeight;
}
function onUseForControlnetClick(req, img) {