From f0ee30fc681e7e03be51e5125351c70e86e1fc70 Mon Sep 17 00:00:00 2001 From: Will Miao Date: Mon, 14 Sep 2026 21:22:31 +0800 Subject: [PATCH] fix(agent): keep each tag's own wording instead of forcing single words MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- py/services/agent/skills/enrich_hf_metadata/prompt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/services/agent/skills/enrich_hf_metadata/prompt.md b/py/services/agent/skills/enrich_hf_metadata/prompt.md index b7dd45c8..034bbbc1 100644 --- a/py/services/agent/skills/enrich_hf_metadata/prompt.md +++ b/py/services/agent/skills/enrich_hf_metadata/prompt.md @@ -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. -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.