aboutsummaryrefslogtreecommitdiffstats
path: root/modules/realesrgan_model.py
diff options
context:
space:
mode:
authorAarni Koskela <akx@iki.fi>2023-12-30 14:37:03 +0000
committerAarni Koskela <akx@iki.fi>2023-12-30 14:37:03 +0000
commit4ad0c0c0a805da4bac03cff86ea17c25a1291546 (patch)
tree9821621545c6989205074d7bd23137eacbbad0e2 /modules/realesrgan_model.py
parentc756133541da478a35a74cda416d114a8973cf8e (diff)
downloadstable-diffusion-webui-gfx803-4ad0c0c0a805da4bac03cff86ea17c25a1291546.tar.gz
stable-diffusion-webui-gfx803-4ad0c0c0a805da4bac03cff86ea17c25a1291546.tar.bz2
stable-diffusion-webui-gfx803-4ad0c0c0a805da4bac03cff86ea17c25a1291546.zip
Verify architecture for loaded Spandrel models
Diffstat (limited to 'modules/realesrgan_model.py')
-rw-r--r--modules/realesrgan_model.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/realesrgan_model.py b/modules/realesrgan_model.py
index 332d8f4b..2a2be5ad 100644
--- a/modules/realesrgan_model.py
+++ b/modules/realesrgan_model.py
@@ -1,9 +1,9 @@
import os
-from modules.upscaler_utils import upscale_with_model
-from modules.upscaler import Upscaler, UpscalerData
-from modules.shared import cmd_opts, opts
from modules import modelloader, errors
+from modules.shared import cmd_opts, opts
+from modules.upscaler import Upscaler, UpscalerData
+from modules.upscaler_utils import upscale_with_model
class UpscalerRealESRGAN(Upscaler):
@@ -40,6 +40,7 @@ class UpscalerRealESRGAN(Upscaler):
info.local_data_path,
device=self.device,
half=(not cmd_opts.no_half and not cmd_opts.upcast_sampling),
+ expected_architecture="RealESRGAN",
)
return upscale_with_model(
mod,