Skip to content

Commit 252c790

Browse files
authored
Add runtime root path to relative vaes and other submodels (#3631)
This PR fixes a crash that would occur when VAEs and other submodels have a relative path in the config file.
2 parents 78857bf + cfd0921 commit 252c790

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

invokeai/backend/model_management/model_manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,14 +423,15 @@ def get_model(
423423
if submodel_type is not None and hasattr(model_config, submodel_type):
424424
override_path = getattr(model_config, submodel_type)
425425
if override_path:
426-
model_path = override_path
426+
model_path = self.app_config.root_path / override_path
427427
model_type = submodel_type
428428
submodel_type = None
429429
model_class = MODEL_CLASSES[base_model][model_type]
430430

431431
# TODO: path
432432
# TODO: is it accurate to use path as id
433433
dst_convert_path = self._get_model_cache_path(model_path)
434+
434435
model_path = model_class.convert_if_required(
435436
base_model=base_model,
436437
model_path=str(model_path), # TODO: refactor str/Path types logic

0 commit comments

Comments
 (0)