mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
wrap version check in try/except
This commit is contained in:
parent
da87266c9c
commit
0cb2cf6644
@ -304,9 +304,13 @@ class ModelInstallService(ModelInstallServiceBase):
|
|||||||
|
|
||||||
for model_key, stanza in yaml.items():
|
for model_key, stanza in yaml.items():
|
||||||
if model_key == "__metadata__":
|
if model_key == "__metadata__":
|
||||||
assert (
|
try:
|
||||||
stanza["version"] == "3.0.0"
|
assert (
|
||||||
), f"This script works on version 3.0.0 yaml files, but your configuration points to a {stanza['version']} version"
|
stanza["version"] == "3.0.0"
|
||||||
|
), f"This script works on version 3.0.0 yaml files, but your configuration points to a {stanza['version']} version"
|
||||||
|
except AssertionError:
|
||||||
|
self._logger.warn(f"Skipping entry with path {stanza.get('path', '')} with outdated metadata version")
|
||||||
|
continue
|
||||||
continue
|
continue
|
||||||
|
|
||||||
_, _, model_name = str(model_key).split("/")
|
_, _, model_name = str(model_key).split("/")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user