Nodes/Anima Adapter Loader/Anima Vocab Pack Loader (CJK)
ComfyUI Node

Anima Vocab Pack Loader (CJK)

Type Japanese Tags Straight Into Anima — No Translating to English First

By sorryhyun·Created 3 months ago·Updated a day ago· 0
Anima Vocab Pack Loader (CJK)
  • model
  • clip
  • MODEL
  • CLIP
vocab_pack

Anima's whole selling point is that Danbooru tags and plain English can live in the same prompt. It's just that the English side does most of the lifting - the model's conditioning is trained on an English-oriented vocabulary, so Japanese you type in quietly degrades to <unk> and means nothing. If your brain reaches for 猫耳, 銀髪 before "cat ears, silver hair," you've been translating all your prompts by hand. AnimaVocabPackLoader is the escape hatch for that.

It's one of the loaders in sorryhyun's ComfyUI-Anima_lora-Adapter pack, the ComfyUI companion to his anima_lora training stack. Where the sibling nodes (AnimaAdapterLoader, AnimaFeraLoader, AnimaSoftTokensLoader) apply trained adapters to model weights, this one does something different: it loads a vocab pack, which the author is careful to say is not a LoRA. It shipped in pack version 3.9.0 (September 2026), is labeled experimental, and currently has exactly one test pack - Japanese - so set expectations accordingly.

What a vocab pack is, and why Anima needs one

Anima's DiT reads text through llm_adapter.embed, a fixed 32128-row embedding table (T5's vocabulary). Japanese characters aren't in it. ComfyUI core hardcodes that table size, and a token id at or above 32128 would outright crash the lookup. A vocab pack sidesteps the whole thing with two files:

  • a .safetensors holding extra trained embedding rows (ext_embed), which become ids ≥ 32128
  • a .json sidecar carrying the segmentation and row maps

Mechanically it's the same hook-not-override trick the rest of this pack uses. On the MODEL side, a forward pre-hook on llm_adapter clamps out-of-range ids to <unk> so nothing crashes, and a forward hook on llm_adapter.embed then overwrites those positions with the pack's rows - gathered per-encode from a CPU-resident fp32 table, so there's no standing VRAM cost. On the CLIP side, the tokenizer gets wrapped in a hybrid encoder: CJK spans are Qwen-tokenized onto the extended ids, everything else flows through ordinary T5, and the qwen3_06b stream passes through untouched. Prompt weighting like (タグ:1.2) still works because it's handled by ComfyUI's own parser before the rewrite.

The reassuring property: only prompts that actually contain CJK characters take the new path. English-only prompts are bit-identical with or without this node, so you can leave it in the workflow permanently and it costs nothing when it isn't needed.

The inputs that matter

All three inputs are required, which is unusual for a loader:

  • model (MODEL) - from your Anima checkpoint loader
  • clip (CLIP) - from the same loader
  • vocab_pack - a dropdown of packs sitting in models/vocab_packs/

Outputs are a patched MODEL and a patched CLIP, and you need to wire both onward - the returned CLIP does the CJK tokenization, the returned MODEL serves the extra rows. Wiring only one is the classic mistake. It composes with the other Anima loaders (a vocab pack touches disjoint parameters from LoRA/ReFT/soft tokens), but it will only ever run against an Anima checkpoint - if the loaded model has no llm_adapter, it errors out immediately.

Install and first pack

Via ComfyUI Manager, search "Anima Adapter Loader". Or:

cd ComfyUI/custom_nodes
git clone https://github.com/sorryhyun/ComfyUI-Anima_lora-Adapter

Then restart ComfyUI. There are no pip dependencies - the vocab-pack runtime ships bundled under the pack's _vendor/ directory. Next, grab the test pack (anima-vocab-pack-ja on HuggingFace by the same author) and drop both files - the .safetensors and the .json, same filename stem - into ComfyUI/models/vocab_packs/. Both are non-negotiable.

Issues you'll actually hit

  • "vocab pack sidecar not found" - you forgot the .json, or the two filenames don't match. Copy both, same stem.
  • "has no 'ext_embed' tensor - not a vocab pack" - you pointed it at a LoRA. LoRAs go in AnimaAdapterLoader, not here.
  • Nothing happens on Japanese prompts - check you routed the returned CLIP (not the original) into your CLIP Text Encode node.
  • Known v1 limitation: rare full-Japanese character names don't tokenize well yet - type those in latin. And if you're after Korean or Chinese, they're not trained; this is a Japanese-only party for now.

It's early days for this node, and "experimental" is doing honest work in that label. But if Japanese is your home language for anime prompting, this is the first real fix for the translate-by-hand workflow on Anima.

Categoryloaders

Inputs (3)

NameTypeDefaultDescription
modelMODEL
clipCLIP
vocab_packCOMBOVocab pack from models/vocab_packs/ — a .safetensors + .json pair with the same stem (copy BOTH files). Not a LoRA.

Outputs (2)

NameTypeDescription
MODELMODEL
CLIPCLIP