aboutsummaryrefslogtreecommitdiffstats
path: root/modules/bsrgan_model.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-09-30 15:55:46 +0000
committerAUTOMATIC <16777216c@gmail.com>2022-09-30 15:55:46 +0000
commitac21d308cd0144b8e02e4cfa1fc36722b2d909d5 (patch)
tree3e3920206b9fff6eb31db591741d88a2d97f3f46 /modules/bsrgan_model.py
parent43c87ef0fcf1771d5511004968e70f804cfd95b8 (diff)
downloadstable-diffusion-webui-gfx803-ac21d308cd0144b8e02e4cfa1fc36722b2d909d5.tar.gz
stable-diffusion-webui-gfx803-ac21d308cd0144b8e02e4cfa1fc36722b2d909d5.tar.bz2
stable-diffusion-webui-gfx803-ac21d308cd0144b8e02e4cfa1fc36722b2d909d5.zip
fix for one error with BSRGAN, though it fails to work anyway #1109
Diffstat (limited to 'modules/bsrgan_model.py')
-rw-r--r--modules/bsrgan_model.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/bsrgan_model.py b/modules/bsrgan_model.py
index 77141545..47346f31 100644
--- a/modules/bsrgan_model.py
+++ b/modules/bsrgan_model.py
@@ -67,9 +67,8 @@ class UpscalerBSRGAN(modules.upscaler.Upscaler):
else:
filename = path
if not os.path.exists(filename) or filename is None:
- print("Unable to load %s from %s" % (self.model_dir, filename))
+ print(f"BSRGAN: Unable to load model from {filename}", file=sys.stderr)
return None
- print("Loading %s from %s" % (self.model_dir, filename))
model = RRDBNet(in_nc=3, out_nc=3, nf=64, nb=23, gc=32, sf=2) # define network
model.load_state_dict(torch.load(filename), strict=True)
model.eval()