mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-09-21 03:01:27 -03:00
fix(other-models): default downloads to a flat path, not {base_model}/{first_tag}
get_download_path_template() fell back to "{base_model}/{first_tag}" for any
unconfigured model type, so other-model downloads were silently nested under an
arbitrary CivitAI tag even though the settings UI exposes no template row for
"other" and priority_tags has no "other" entry (making {first_tag} resolve to
tags[0]).
Add DEFAULT_DOWNLOAD_PATH_TEMPLATES with other -> "" so unconfigured and
unknown types resolve to a flat layout under the already sub_type-scoped
default_other_roots; explicit settings.json values still win. Mirror the flat
default in the frontend DEFAULT_PATH_TEMPLATES and stop the download/move
default-path previews from rendering "/undefined" or a dangling slash.
This commit is contained in:
@@ -251,6 +251,19 @@ DEFAULT_PRIORITY_TAG_CONFIG = {
|
||||
"embedding": ", ".join(CIVITAI_MODEL_TAGS),
|
||||
}
|
||||
|
||||
# Default download path template for each model type. "other" defaults to a
|
||||
# flat layout (empty template) on purpose: other-model downloads are already
|
||||
# separated by sub_type roots (default_other_roots), and priority_tags has no
|
||||
# "other" entry, so {first_tag} would resolve to an arbitrary CivitAI tag and
|
||||
# scatter files into unstable folders. Users can still opt in to a template by
|
||||
# writing "other" into download_path_templates in settings.json.
|
||||
DEFAULT_DOWNLOAD_PATH_TEMPLATES: Dict[str, str] = {
|
||||
"lora": "{base_model}/{first_tag}",
|
||||
"checkpoint": "{base_model}/{first_tag}",
|
||||
"embedding": "{base_model}/{first_tag}",
|
||||
"other": "",
|
||||
}
|
||||
|
||||
# baseModel values from CivitAI that should be treated as diffusion models (unet)
|
||||
# These model types are incorrectly labeled as "checkpoint" by CivitAI but are actually diffusion models
|
||||
DIFFUSION_MODEL_BASE_MODELS = frozenset(
|
||||
|
||||
Reference in New Issue
Block a user