TK 触发词
Stop copy-pasting trigger words out of the LoRA description
- trigger_words
Every LoRA workflow has the same quiet chore. You attach a character LoRA, then you go back to Civitai, scroll the model page, copy miku_hairband, cyan twin tails out of the description, and paste it into your prompt. Do that across six LoRAs and you've spent more time reading web pages than generating.
TK 触发词 is the fix: feed it the same <lora:name:weight> syntax the LoRA loader uses, get the trigger words back as one string. It's part of TK Toolkit (anima-toolkit by 时运tk) and it pairs directly with the pack's batch LoRA loader.
How it gets the words
Three sources, in priority order, straight from the source:
- The metadata the toolkit already matched. When you run the panel's local LoRA scan, it hashes your files, matches them against Civitai, and stores each LoRA's trigger words with the rest of the record. The node reads that saved data, so words come out even for LoRAs you never manually inspected.
- Manual additions. Whatever you type into
trigger_wordsgets appended. - The filename as a last resort. A LoRA with no record produces its file name. This is the weak fallback and you can tell when it fires - you get
my_character_v3_finalin your prompt instead of actual words, which does nothing useful.
Results are deduplicated with order preserved, so reusing one LoRA twice doesn't duplicate its words.
Inputs and output
- lora_syntax - required. The LoRA tag string,
<lora:name:0.8> <lora:other:1.0>. It's a text field, but it's meant to be wired - connect thelora_syntax-style output from your LoRA nodes, or paste from the loader's text box. Keeping it as a plain string input is what lets this node be a dumb, stateless extractor. - trigger_words - your manual additions, comma or space separated, appended after the extracted ones. Use it for a LoRA whose real activation phrase isn't in the metadata, or for a general prompt habit like
official art. - tw_map - the card-edited trigger-word JSON, maintained by the node's own frontend and stored with the workflow. You won't type here; it's how per-LoRA edits survive a reload instead of being lost.
One output, trigger_words, STRING. Wire it into your text encode, or into TK 文本合并 alongside lighting, camera and prompt nodes.
The difference from the loader's own output
The batch LoRA loader also exposes a trigger_words output, and it's not the same thing. That one returns trigger words for the LoRAs currently active (weight non-zero) on the loader, including ones whose files are missing, and it's governed by the loader's own master switch. This node is the standalone version: you feed it a tag string from anywhere, and it doesn't care what's loaded. Use the loader's output when the LoRA list and the trigger list should never disagree; use this node when you want to control the prompt independently, or when the tags come from a node that isn't a LoRA loader at all.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Ararararararaki/comfyui-anima-toolkit
# restart ComfyUI
ComfyUI Manager: search TK Toolkit (anima-toolkit). aiohttp and requests are the only required packages. The node registers under TK/loaders, next to the batch loader.
Where people get burned
Filename fallback looks like success. A missing Civitai record doesn't error - you get a plausible-looking token that does nothing. If your trigger words contain underscores or version numbers, they're filenames, not triggers. Fix: run the panel's match pass, or type the real phrase into trigger_words.
The metadata has to have been collected first. This node reads what the toolkit has stored; it does not query Civitai on the fly. Open the panel, scan your LoRA folders and match them once, and the node has something to work with from then on.
Trigger words are not a prompt. They're activation phrases, and on a model as language-capable as Anima they're often less necessary than the LoRA-culture habit suggests - Anima understands the character name, the series and a plain description, and a lot of what people train LoRAs for on SDXL it just knows. Add the triggers when the LoRA is a style or an original character; skip them when they're just clutter in a 75-token-era prompt block that Anima doesn't have.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| lora_syntax | STRING | LoRA 标签;触发词从这些 LoRA 提取。 | |
| trigger_words | STRING | 可选:手动追加触发词,与自动提取的合并。 | |
| tw_map | STRING | 卡片编辑的触发词 JSON,随工作流保存;刷新/重载后恢复卡片内容。 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| trigger_words | STRING | — |