mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-02-03 14:21:38 -08:00
Merge pull request #14473 from akx/soften-model-arch-check
Soften Spandrel model-architecture check to just a warning
This commit is contained in:
commit
a86f4411cb
1 changed files with 3 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue