fix(mm): handle relative conversion config paths

I have tested main, controlnet and vae checkpoint conversions.
This commit is contained in:
psychedelicious
2024-03-29 22:32:43 +11:00
committed by Kent Keirsey
parent 31e9cf1f06
commit 6d261a5a13
4 changed files with 4 additions and 4 deletions

View File

@ -612,7 +612,7 @@ class ModelInstallService(ModelInstallServiceBase):
if isinstance(info, CheckpointConfigBase):
# Checkpoints have a config file needed for conversion. Same handling as the model weights - if it's in the
# invoke-managed legacy config dir, we use a relative path.
legacy_config_path = Path(info.config_path).resolve()
legacy_config_path = self.app_config.legacy_conf_path / info.config_path
if legacy_config_path.is_relative_to(self.app_config.legacy_conf_path):
legacy_config_path = legacy_config_path.relative_to(self.app_config.legacy_conf_path)
info.config_path = legacy_config_path.as_posix()