Skip to content

Commit 9bd47b5

Browse files
isaaccorleyCopilot
andauthored
Update src/pixelverse/models/registry.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent a724924 commit 9bd47b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pixelverse/models/registry.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def list_models() -> list[str]:
2828

2929

3030
def get_weights(name: str) -> Weights:
31-
assert name in _model_weights, f"Model {name} not found"
31+
if name not in _model_weights:
32+
raise KeyError(f"Model {name} not found")
3233
return _model_weights[name] # type: ignore
3334

3435

0 commit comments

Comments
 (0)