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:
+15
-3
@@ -273,6 +273,16 @@ CIVITAI_MODEL_TAGS = [
|
||||
"action",
|
||||
]
|
||||
|
||||
# Civitai tags that describe the listing rather than the model's content.
|
||||
# Uploaders can also set these by hand, so they must not be picked as an
|
||||
# automatic folder name; a user who wants one can still name it explicitly in
|
||||
# their priority tag list.
|
||||
CIVITAI_META_TAGS = frozenset(
|
||||
{
|
||||
"base model",
|
||||
}
|
||||
)
|
||||
|
||||
# Default priority tag configuration strings for each model type
|
||||
DEFAULT_PRIORITY_TAG_CONFIG = {
|
||||
"lora": ", ".join(CIVITAI_MODEL_TAGS),
|
||||
@@ -295,9 +305,11 @@ DEFAULT_DOWNLOAD_PATH_TEMPLATES: Dict[str, str] = {
|
||||
|
||||
# Length guards for template placeholders that end up in file and folder names.
|
||||
# Windows enforces MAX_PATH (260 characters) on the full path and 255 on a
|
||||
# single path component, and a model folder also has to leave room for the
|
||||
# model file, its ".civitai.info"/".json" sidecars and preview images. Values
|
||||
# stay well below those limits so the surrounding files still fit.
|
||||
# single path component. A model folder also holds the model file, the
|
||||
# ".metadata.json" sidecar written by LoRA Manager, preview images and the
|
||||
# metadata files other tools drop next to the model (for example
|
||||
# ".civitai.info", which LoRA Manager only reads), so names stay well below
|
||||
# those limits.
|
||||
#
|
||||
# Tags get a much tighter budget than other names: some CivitAI uploaders dump
|
||||
# their whole keyword list into a single tag (see issue #1119), and such a tag
|
||||
|
||||
Reference in New Issue
Block a user