TK 提示词扩写
Anima's second block, written from tags you already typed — no LLM
- prompt
- natural
- vlm_prompt
The structure that works on Anima is a tag block, an empty line, then a descriptive paragraph. The tag block is the easy half - your WD14 tagger gives you that for free. The paragraph is where people stall, and the usual answer is a local LLM prompt enhancer, which comes with two failure modes the community has documented thoroughly: chat scaffolding leaking into your conditioning ("Here is your enhanced prompt:"), and subject drift, where the model invents detail you never asked for. Let a captioning VLM do it instead and you hit the third wall - the moment two characters are in frame, VLMs mix up who is wearing what.
TK 提示词扩写 (AnimaTKPromptExpander) takes a different route. Danbooru tags are already English phrases - long hair, looking at viewer, school uniform - so building a sentence out of them needs no translation and no generation, just classification and templates. Every word in the output came from your input, which means it structurally cannot hallucinate, it costs microseconds, and it uses zero VRAM. That is the pitch, and it holds up. The honest caveat is the other side of the same coin: it can only read what you wrote.
How it works
Same taxonomy as the pack's formatter - roughly 693k Danbooru tags in 20 categories, built offline from the board's API and shipped in the repo. Tags get bucketed by category and assembled into sentences in a fixed order: subject first, then features, then costume/pose/expression, then camera and setting, then mood. 2girls becomes "two girls"; a character tag like nozomi (blue archive) becomes "Nozomi from Blue Archive" - the model card explicitly advises naming the character before describing appearance, and this follows that. Hair tags get merged, so long hair plus silver hair gives you "long silver hair" rather than two clauses fighting each other.
The style dropdown sets the length: 简洁(1 句), 标准(2-3 句), or 详细(3-4 句), which adds a camera/background/props sentence and then a lighting sentence. Blank-line input still works the way it does across this pack's text nodes: everything before the blank line is tags, everything after is natural language you wrote yourself, so it composes with the formatter and the Danbooru Tag Getter in either direction.
The inputs you'll actually touch
prompt is required. The toggles that matter are:
write_natural(on) - the whole point; turn it off if you only want the tag block back.style- sentence count.keep_input_natural(on) - keep the prose you pasted, or replace it with the generated version.normalise_output(on) - outputs tags in Anima's space-separated form rather than whatever your tagger produced.fill_lighting,fill_camera,fill_quality- all off by default, and that's the right default. They append from a curated list (fill_lighting_tagsdefaults tosoft lighting, soft shadows,fill_camera_tagstocowboy shot,fill_quality_tagstomasterpiece, best quality) and only fire when that dimension is genuinely missing.dedupe_filledstops them duplicating what you already have.
Three outputs. prompt is your tag string, optionally with the fill-ins appended. natural is the generated paragraph - a separate port on purpose, because tags do precision and prose does coherence and you'll want to place them yourself. vlm_prompt is the interesting one: it's an instruction, with your existing tags embedded, telling a vision model to add only what's visible in the image but missing from the tag list, and to answer in two blocks, <danbooru_tags> and <natural>.
The VLM path
Wire vlm_prompt into the VLM or LLM node you were already running - that's the design goal: no extra inference call, the one you were making anyway does this job too. Route its reply back into vlm_output and the node parses the two blocks. validate_vlm_tags (on) then checks every returned tag against the taxonomy and drops the phrases a language model naturally produces - "soft afternoon light fills the room" is not a Danbooru tag and won't be treated as one, unless you flip keep_unknown_vlm_tags. keep_vlm_natural lets the VLM's description win over the template version, since it saw the actual image. existing_tags_override lets you feed a different tag list into the instruction without changing what comes out.
One practical note: the instruction text itself is written in Chinese, matching the pack author's language. Every modern VLM handles that, but an English-only small model is a bad fit.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Ararararararaki/comfyui-anima-toolkit
Restart ComfyUI. In Manager, search TK Toolkit (registry id anima-toolkit). The node lives under TK → TK/prompt, needs no model downloads and no packages beyond what ComfyUI already has, and the taxonomy index (data/tag_taxonomy.tsv.gz) ships in the repo - keep the data/ folder or classification quietly degrades to "everything is unclassified". Docs are Chinese-first; there is effectively no English-language discussion of this pack to fall back on.
If the input is empty, the node still hands you a usable vlm_prompt, which is a neat way to caption an image from nothing. If a fill toggle seems dead, check whether you already had a light/shadow tag - camera fill counts looking at viewer as camera information, so it won't stuff a cowboy shot on top of it.
Where it falls down is the same place every auto-describer does: multi-character scenes. The templates build one subject, so two people collapse into a shared description, and Anima's real answer to that is word order - naming who does what, in order. For a two-hander, write that paragraph yourself and use this node for everything else.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | 标签串;空行之后的段落视为自然语言原样保留 | |
| write_naturalopt | BOOLEAN | true | — |
| styleopt | COMBO | 标准(2-3 句) | 4 options: , 简洁(1 句), 标准(2-3 句), 详细(3-4 句) |
| keep_input_naturalopt | BOOLEAN | true | — |
| fill_lightingopt | BOOLEAN | false | — |
| fill_lighting_tagsopt | STRING | soft lighting, soft shadows | — |
| fill_cameraopt | BOOLEAN | false | — |
| fill_camera_tagsopt | STRING | cowboy shot | — |
| fill_qualityopt | BOOLEAN | false | — |
| fill_quality_tagsopt | STRING | masterpiece, best quality | — |
| dedupe_filledopt | BOOLEAN | true | — |
| vlm_outputopt | STRING | 把 VLM 的返回接到这里(配合 vlm_prompt 指令使用);会自动解析 <danbooru_tags> / <natural> 两个块 | |
| validate_vlm_tagsopt | BOOLEAN | true | — |
| keep_unknown_vlm_tagsopt | BOOLEAN | false | — |
| keep_vlm_naturalopt | BOOLEAN | true | — |
| existing_tags_overrideopt | STRING | — | |
| normalise_outputopt | BOOLEAN | true | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| natural | STRING | — |
| vlm_prompt | STRING | — |