mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-09-20 18:51:26 -03:00
fix(agent): keep each tag's own wording instead of forcing single words
The tags instruction demanded "all lowercase, no spaces, no hyphens" with single-word examples. That clause arrived in the same commit that added the priority_tags cross-reference, so it reads as a crude way of pushing the model towards that (entirely single-word) vocabulary rather than as a requirement in its own right — and nothing in the codebase depends on it: * `_merge_tags` only lowercases and de-duplicates; * `resolve_priority_tag` matches aliases exactly, and the priority config syntax already supports multi-word entries and aliases; * the tag FTS index tokenises on non-alphanumerics, so a hyphenated tag is indexed as two tokens and stays searchable; * tags never reach a ComfyUI prompt — that is `trainedWords`. It also fought the priority_tags rule it was meant to support. Handed the site-curated `character-enhancement`, satisfying both rules produced `character` as well; the run added generic priority-list tags and dropped the site's own wording. The spelling used by the site, the frontmatter or the author is now kept verbatim — hyphenated, multi-word or non-Latin — and no separator-free synonym is invented for a tag already included. Measured on a Krea 2 portrait LoRA, the proposal went from nine tags (four of them generic priority-list words) to six grounded ones.
This commit is contained in:
@@ -112,7 +112,7 @@ Sources to consider:
|
|||||||
|
|
||||||
2. **Cross-reference against the priority_tags reference.** Only include a tag if it meaningfully describes what the model actually creates (subject, style, character type) and is semantically close to one of the priority_tags. If none of the README's tags match meaningful categories, prefer returning a smaller set or an empty array over including low-value tags.
|
2. **Cross-reference against the priority_tags reference.** Only include a tag if it meaningfully describes what the model actually creates (subject, style, character type) and is semantically close to one of the priority_tags. If none of the README's tags match meaningful categories, prefer returning a smaller set or an empty array over including low-value tags.
|
||||||
|
|
||||||
3. **All lowercase, no spaces, no hyphens** (use single words like `"photorealistic"`, `"anime"`, `"character"`). This rule applies to Latin-script tags; when the model's own tags are in another script (e.g. Chinese), keep them verbatim instead of dropping or translating them.
|
3. **All lowercase, and keep each tag's own wording.** Prefer the spelling already used by the site, the frontmatter, or the author — including hyphenated and multi-word tags such as `"sci-fi"`, `"semi-realistic"`, `"character-enhancement"` or `"art style"`. Do **not** strip separators or invent a single-word variant of a tag you are already including (e.g. do not emit both `"character-enhancement"` and `"character"`). When a tag is written in another script (e.g. Chinese), likewise keep it verbatim instead of translating it.
|
||||||
|
|
||||||
4. **Never invent a tag** that neither the site-provided metadata, the YAML frontmatter, nor the README text supports.
|
4. **Never invent a tag** that neither the site-provided metadata, the YAML frontmatter, nor the README text supports.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user