diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-05-14 08:46:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-14 08:46:27 +0000 |
commit | 80adb6979d46bbb832254004cac4f4f9bec9efb3 (patch) | |
tree | e206ee60f9be21e9e20d483213b7d0a610d2bdbd /modules/upscaler.py | |
parent | 1dcd6723242c3d691610f9ed937951baea49c2d1 (diff) | |
parent | 3ddc76342298ad0b2d14cb571ceb48c0b0c4176d (diff) | |
download | stable-diffusion-webui-gfx803-80adb6979d46bbb832254004cac4f4f9bec9efb3.tar.gz stable-diffusion-webui-gfx803-80adb6979d46bbb832254004cac4f4f9bec9efb3.tar.bz2 stable-diffusion-webui-gfx803-80adb6979d46bbb832254004cac4f4f9bec9efb3.zip |
Merge branch 'dev' into find_vae
Diffstat (limited to 'modules/upscaler.py')
-rw-r--r-- | modules/upscaler.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/upscaler.py b/modules/upscaler.py index e2eaa730..8acb6e96 100644 --- a/modules/upscaler.py +++ b/modules/upscaler.py @@ -2,8 +2,6 @@ import os from abc import abstractmethod import PIL -import numpy as np -import torch from PIL import Image import modules.shared @@ -43,9 +41,9 @@ class Upscaler: os.makedirs(self.model_path, exist_ok=True) try: - import cv2 + import cv2 # noqa: F401 self.can_tile = True - except: + except Exception: pass @abstractmethod @@ -57,7 +55,7 @@ class Upscaler: dest_w = int(img.width * scale) dest_h = int(img.height * scale) - for i in range(3): + for _ in range(3): shape = (img.width, img.height) img = self.do_upscale(img, selected_model) |