aboutsummaryrefslogtreecommitdiffstats
path: root/modules/upscaler.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-06-27 05:38:14 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-06-27 05:38:14 +0000
commit394ffa7b0a7fff3ec484bcd084e673a8b301ccc8 (patch)
treeb0e9b9d93f90b5d50084292a48578bd4f9a83ec6 /modules/upscaler.py
parentbaf6946e06249c5af9851c60171692c44ef633e0 (diff)
parentdbc88c96450793b08b520f3b86cd46d6aeaaae52 (diff)
downloadstable-diffusion-webui-gfx803-394ffa7b0a7fff3ec484bcd084e673a8b301ccc8.tar.gz
stable-diffusion-webui-gfx803-394ffa7b0a7fff3ec484bcd084e673a8b301ccc8.tar.bz2
stable-diffusion-webui-gfx803-394ffa7b0a7fff3ec484bcd084e673a8b301ccc8.zip
Merge branch 'release_candidate'
Diffstat (limited to 'modules/upscaler.py')
-rw-r--r--modules/upscaler.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/upscaler.py b/modules/upscaler.py
index 7b1046d6..e682bbaa 100644
--- a/modules/upscaler.py
+++ b/modules/upscaler.py
@@ -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 = int((img.width * scale) // 8 * 8)
+ dest_h = int((img.height * scale) // 8 * 8)
for _ in range(3):
shape = (img.width, img.height)
@@ -77,7 +77,7 @@ class Upscaler:
pass
def find_models(self, ext_filter=None) -> list:
- return modelloader.load_models(model_path=self.model_path, model_url=self.model_url, command_path=self.user_path)
+ return modelloader.load_models(model_path=self.model_path, model_url=self.model_url, command_path=self.user_path, ext_filter=ext_filter)
def update_status(self, prompt):
print(f"\nextras: {prompt}", file=shared.progress_print_out)