aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-01-02 20:01:16 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-01-02 20:01:16 +0300
commit4dbde228ff48dbb105241b1ed25c21ce3f87d182 (patch)
tree53387c37fbe048a66ce900cd9e1a7ff3dd3b0288 /modules
parentef27a18b6b7cb1a8eebdc9b2e88d25baf2c2414d (diff)
make it possible to use fractional values for SD upscale.
Diffstat (limited to 'modules')
-rw-r--r--modules/upscaler.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/upscaler.py b/modules/upscaler.py
index c4e6e6bd..231680cb 100644
--- a/modules/upscaler.py
+++ b/modules/upscaler.py
@@ -53,10 +53,10 @@ class Upscaler:
def do_upscale(self, img: PIL.Image, selected_model: str):
return img
- def upscale(self, img: PIL.Image, scale: int, selected_model: str = None):
+ def upscale(self, img: PIL.Image, scale, selected_model: str = None):
self.scale = scale
- dest_w = img.width * scale
- dest_h = img.height * scale
+ dest_w = int(img.width * scale)
+ dest_h = int(img.height * scale)
for i in range(3):
shape = (img.width, img.height)