Skip to content

Commit

Permalink
Merge pull request #14473 from akx/soften-model-arch-check
Browse files Browse the repository at this point in the history
Soften Spandrel model-architecture check to just a warning
  • Loading branch information
AUTOMATIC1111 authored Dec 30, 2023
2 parents 16848f9 + af050dc commit a86f441
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/modelloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a86f441

Please sign in to comment.