fix(update): resolve template path when updating to a different base model (#1059)

Version-tab updates reused the current version's folder, so updating a LoRA
to a version with a different base model (e.g. Illustrious -> Anima) ignored
the download path template and landed in the old version's directory.

When the target version's base model differs from the current local version
and a path template is configured, re-resolve the template under the same
model root. The backend keeps an explicitly provided root when
use_save_dir_as_root is set, so regular downloads still use the default root.
This commit is contained in:
Will Miao
2026-08-12 18:45:54 +08:00
parent 94e3f54571
commit 680f0a57f5
7 changed files with 356 additions and 42 deletions
+1
View File
@@ -83,6 +83,7 @@ class DownloadCoordinator:
save_dir=payload.get("model_root"),
relative_path=payload.get("relative_path", ""),
use_default_paths=payload.get("use_default_paths", False),
use_save_dir_as_root=payload.get("use_save_dir_as_root", False),
progress_callback=progress_callback,
download_id=download_id,
source=payload.get("source"),