diff options
author | papuSpartan <30642826+papuSpartan@users.noreply.github.com> | 2023-05-12 03:40:17 +0000 |
---|---|---|
committer | papuSpartan <30642826+papuSpartan@users.noreply.github.com> | 2023-05-12 03:40:17 +0000 |
commit | 75b3692920e8dceb9031dd405b9226b55d286ce1 (patch) | |
tree | b7bb9db2aca00e54525b82ed1d902eac273766b9 /modules/upscaler.py | |
parent | f0efc8c211fc2d2c2f8caf6e2f92501922d18c99 (diff) | |
parent | abe32cefa39dee36d7f661d4e63c28ea8dd60c4f (diff) | |
download | stable-diffusion-webui-gfx803-75b3692920e8dceb9031dd405b9226b55d286ce1.tar.gz stable-diffusion-webui-gfx803-75b3692920e8dceb9031dd405b9226b55d286ce1.tar.bz2 stable-diffusion-webui-gfx803-75b3692920e8dceb9031dd405b9226b55d286ce1.zip |
Merge branch 'dev' of https://github.com/AUTOMATIC1111/stable-diffusion-webui into tomesd
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) |