diff --git a/ui/media/js/main.js b/ui/media/js/main.js index 5e2f84eb..d30d252b 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -269,7 +269,7 @@ function showImages(reqBody, res, outputContainer, livePreview) { - ${imageWidth} x ${imageHeight} + ` outputContainer.appendChild(imageItemElem) @@ -298,6 +298,10 @@ function showImages(reqBody, res, outputContainer, livePreview) { imageElem.setAttribute('data-steps', imageInferenceSteps) imageElem.setAttribute('data-guidance', imageGuidanceScale) + imageElem.addEventListener('load', function() { + imageItemElem.querySelector('.img_bottom_label').innerText = `${this.naturalWidth} x ${this.naturalHeight}` + }) + const imageInfo = imageItemElem.querySelector('.imgItemInfo') imageInfo.style.visibility = (livePreview ? 'hidden' : 'visible')