mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
pass config_path to migration path, make sure it uses absolute path
This commit is contained in:
parent
0bd9a0a9ea
commit
df0a5aa92a
@ -321,7 +321,8 @@ class ModelInstallService(ModelInstallServiceBase):
|
|||||||
model_path = self._app_config.models_path / model_path
|
model_path = self._app_config.models_path / model_path
|
||||||
model_path = model_path.resolve()
|
model_path = model_path.resolve()
|
||||||
description = stanza.get("description", "")
|
description = stanza.get("description", "")
|
||||||
model_info = {"name": model_name, "description": description}
|
config_path =stanza.get("config_path", "")
|
||||||
|
model_info = {"name": model_name, "description": description, "config_path": config_path}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
id = self.register_path(model_path=model_path, config=model_info)
|
id = self.register_path(model_path=model_path, config=model_info)
|
||||||
@ -587,9 +588,8 @@ class ModelInstallService(ModelInstallServiceBase):
|
|||||||
|
|
||||||
# add 'main' specific fields
|
# add 'main' specific fields
|
||||||
if isinstance(info, CheckpointConfigBase):
|
if isinstance(info, CheckpointConfigBase):
|
||||||
# make config relative to our root
|
|
||||||
legacy_conf = (self.app_config.root_dir / self.app_config.legacy_conf_dir / info.config_path).resolve()
|
legacy_conf = (self.app_config.root_dir / self.app_config.legacy_conf_dir / info.config_path).resolve()
|
||||||
info.config_path = legacy_conf.relative_to(self.app_config.root_dir).as_posix()
|
info.config_path = legacy_conf.as_posix()
|
||||||
self.record_store.add_model(info)
|
self.record_store.add_model(info)
|
||||||
return info.key
|
return info.key
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user