mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-09-23 12:04:09 -03:00
fix(organize): exclude Civitai meta tags from folder names (#1119)
Follow-up to the keyword-dump guard. The reported model's tag list is ["lora, character, ... face", "base model"], so skipping the dump left the "base model" label to be picked as the folder name. That label describes Civitai's listing rather than the model's content, which makes it as meaningless as a folder as the blob was. Add CIVITAI_META_TAGS and is_civitai_meta_tag(), and skip those labels in the automatic fallback. An explicit priority entry still matches them, so a user who does want a "base model" folder can configure one. The reported model now resolves to "Krea 2/no tags" instead of "Krea 2/base model". Also correct a comment that listed ".civitai.info" among the files sitting next to a model. LoRA Manager only reads that sidecar -- other tools write it -- and writes ".metadata.json" itself.
This commit is contained in:
@@ -47,6 +47,7 @@ from ..utils.settings_paths import (
|
||||
from ..utils.tag_priorities import (
|
||||
PriorityTagEntry,
|
||||
collect_canonical_tags,
|
||||
is_civitai_meta_tag,
|
||||
is_usable_path_tag,
|
||||
parse_priority_tag_string,
|
||||
resolve_priority_tag,
|
||||
@@ -1572,8 +1573,11 @@ class SettingsManager:
|
||||
|
||||
# Fall back to the first tag that is usable as a folder name. The raw
|
||||
# tag list can contain keyword dumps that would become unusable folders
|
||||
# and break path length limits, so skip those (#1119).
|
||||
# and break path length limits, and Civitai mixes in structural labels
|
||||
# like "base model" that mean nothing as a folder, so skip both (#1119).
|
||||
for tag in tags:
|
||||
if is_civitai_meta_tag(tag):
|
||||
continue
|
||||
if is_usable_path_tag(tag):
|
||||
return tag.strip()
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user