From 33ca04b9163c670f9a5455b41bb75f4e0531bf3a Mon Sep 17 00:00:00 2001 From: Gary Wolfe Date: Sun, 22 Dec 2024 21:22:37 -0500 Subject: [PATCH] Use as Input sets size Force the generate size to match the image size when clicking Use as Input. --- ui/media/js/main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/media/js/main.js b/ui/media/js/main.js index e59a6ace..9e288473 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -623,6 +623,11 @@ 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. + widthField.value = img.naturalWidth; + heightField.value = img.naturalHeight; } function onUseForControlnetClick(req, img) {