Unverified Commit 78a602ae authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub
Browse files

Merge pull request #10796 from ramyma/round-upscale-result-dims

Round down scale destination dimensions to nearest multiple of 8
parents 2fcd64b9 3539885f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -53,8 +53,8 @@ class Upscaler:

    def upscale(self, img: PIL.Image, scale, selected_model: str = None):
        self.scale = scale
        dest_w = int(img.width * scale)
        dest_h = int(img.height * scale)
        dest_w = round((img.width * scale - 4) / 8) * 8
        dest_h = round((img.height * scale - 4) / 8) * 8

        for _ in range(3):
            shape = (img.width, img.height)