fix migrate script to work when autoimport directories are None

This commit is contained in:
Lincoln Stein
2023-08-30 18:46:17 -04:00
parent 715686477e
commit 83163ddd9a
3 changed files with 10 additions and 10 deletions

View File

@ -492,10 +492,10 @@ def _parse_legacy_yamlfile(root: Path, initfile: Path) -> ModelPaths:
loras = paths.get("lora_dir", "loras")
controlnets = paths.get("controlnet_dir", "controlnets")
return ModelPaths(
models=root / models,
embeddings=root / embeddings,
loras=root / loras,
controlnets=root / controlnets,
models=root / models if models else None,
embeddings=root / embeddings if embeddings else None,
loras=root / loras if loras else None,
controlnets=root / controlnets if controlnets else None,
)