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 55daf647a0
commit 19c6e10eda

View File

@ -623,6 +623,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) {