Commit a86f4411 authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub

Merge pull request #14473 from akx/soften-model-arch-check

Soften Spandrel model-architecture check to just a warning
parents 16848f95 af050dca
...@@ -196,7 +196,9 @@ def load_spandrel_model( ...@@ -196,7 +196,9 @@ def load_spandrel_model(
import spandrel import spandrel
model = spandrel.ModelLoader(device=device).load_from_file(path) model = spandrel.ModelLoader(device=device).load_from_file(path)
if expected_architecture and model.architecture != expected_architecture: 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: if half:
model = model.model.half() model = model.model.half()
if dtype: if dtype:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment