aboutsummaryrefslogtreecommitdiffstats
path: root/modules/modelloader.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-12-30 19:13:29 +0000
committerGitHub <noreply@github.com>2023-12-30 19:13:29 +0000
commita86f4411cb2ed25a279132d3af34ffdba1d38329 (patch)
tree9b1d2054e4b813073765d495c265a01b054c7e1d /modules/modelloader.py
parent16848f950b47dcc3e10216a64c3f26493fdef11c (diff)
parentaf050dcaa75ef40b6b1c3da3361f32fe52786aeb (diff)
downloadstable-diffusion-webui-gfx803-a86f4411cb2ed25a279132d3af34ffdba1d38329.tar.gz
stable-diffusion-webui-gfx803-a86f4411cb2ed25a279132d3af34ffdba1d38329.tar.bz2
stable-diffusion-webui-gfx803-a86f4411cb2ed25a279132d3af34ffdba1d38329.zip
Merge pull request #14473 from akx/soften-model-arch-check
Soften Spandrel model-architecture check to just a warning
Diffstat (limited to 'modules/modelloader.py')
-rw-r--r--modules/modelloader.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/modelloader.py b/modules/modelloader.py
index f4182559..6b7d697f 100644
--- a/modules/modelloader.py
+++ b/modules/modelloader.py
@@ -196,7 +196,9 @@ def load_spandrel_model(
import spandrel
model = spandrel.ModelLoader(device=device).load_from_file(path)
if expected_architecture and model.architecture != expected_architecture:
- raise TypeError(f"Model {path} is not a {expected_architecture} model")
+ logger.warning(
+ f"Model {path!r} is not a {expected_architecture!r} model (got {model.architecture!r})",
+ )
if half:
model = model.model.half()
if dtype: