Diffusion Single File
comfyui

Anima JP-extended: type Japanese in the prompt, get that text drawn (ComfyUI, LoRA-compatible)

#241
by sorryhyun - opened

Hi all. Anima's T5-side tokenizer has no ids for Japanese or even ~ #134, so any Japanese string in a prompt turns into <unk>, and the model can't be asked to draw it. I added trained embedding rows for it and packed the result as a single ComfyUI checkpoint:

https://huggingface.co/sorryhyun/anima-jp-extended

  • Base Anima (anima-base-v1.0) plus 1,573 trained text-embedding rows (163 kana, 1,410 kanji).
  • English prompts tokenize exactly as before, so an English prompt gives the same image as base.
  • The rows don't touch any LoRA-adaptable weight so any lora or even merged anima is compatible.

Japanese prompt: base vs JP-extended

Same prompt and seeds. Top: base Anima, which turns the string into <unk> and draws unrelated Japanese-looking text. Bottom: JP-extended, which draws 涙が出る. It isn't letter-perfect every time (涙 is the weakest glyph).

Usage (ComfyUI)

  1. Install ComfyUI-Anima_lora-Adapter ≥ 3.15.0 (ComfyUI-Manager, or GitHub).
  2. Put anima_jp_extended.safetensors in models/diffusion_models/.
  3. Use Anima Merged Loader (CJK) in place of the UNet + CLIP loaders.
  4. Quote the Japanese inside an English clause:
1girl, solo, speech bubble. Text reads as "何言ってるの?".

The repo has a minimal workflow JSON and an example image with the workflow embedded (drag it into ComfyUI). A stock UNet loader also loads the file, but as plain Anima with no Japanese.

Other checkpoints

If you'd rather have the rows on another Anima derivative, they are also published as a standalone pack (sorryhyun/anima-vocab-pack-cjk, jp_v1), which loads with AnimaVocabPackLoader. I tested it on the official anima-turbo-v1.1: its embedding table is base Anima's bit for bit, and it draws the string at 8 steps / CFG 1. A derivative that fine-tuned the LLM adapter may read the rows differently.

For training, anima_lora encodes captions through the pack by default, so you can train LoRAs on data whose captions quote Japanese text.

Sign up or log in to comment