Multilingual Prompt Rewrite (AnimoFlow)
Type in your language, get a motion that obeys
- rewritten_prompt
- rewrite_info
The text-to-motion models in this pack were trained on HumanML3D - a dataset of English captions in a very particular style ("a person walks forward", not "someone strolls"). Type a prompt in French or Japanese or freeform English and the generators will... try, with mixed results. AnimoFlow_PromptRewrite is the node that fixes the mismatch: it takes a motion prompt in any language, rewrites it into a HumanML3D-style English caption, and hands that to the generator. It's a translation node, a style-normalizer, and - because the default demo prompt skips instantly - a surprisingly easy thing to misunderstand.
The mechanism is a small on-device pipeline: a Qwen2.5-1.5B model does the rewriting, with a MiniLM retriever pulling a few HumanML3D captions as few-shot examples, all driven by the shared animoflow_stages/rewrite.py - the same rewriter the hosted webUI uses. The catch, and it's a big one: the first real rewrite lazily downloads ~3.2 GB of weights from Hugging Face (Qwen + retriever + caption corpus, one-time). That's not a background detail; it's the thing that makes this node feel broken on first use, because it just hangs on the first queue while gigabytes download.
The settings
- prompt - multiline, any language, any register. The tooltip spells out the 3.2 GB one-time download for your first non-English or freeform prompt.
- mode - three choices:
- auto (default) - rewrite unless the input already looks like a HumanML3D caption. The cheap heuristic means "a person walks forward" is passed through untouched, model never invoked. This is why the default demo prompt "skips instantly."
- force - always rewrite, even if it's already English and caption-shaped.
- skip - pass through unchanged, no model load at all.
The outputs are rewritten_prompt (STRING) and rewrite_info (STRING, a diagnostic - what mode ran, what changed). You wire rewritten_prompt into the generator's prompt input, replacing the text box you'd normally type in.
The deliberate design choices
Two behaviors are worth internalizing because they're unusual. First, failures are loud: if the rewriter can't load, the node errors red - it never silently passes the original prompt through. The pack has an explicit no-silent-fallback policy, and it's the right call, but it means a broken rewriter takes down your workflow visibly. Second, the node is generic - it's not tied to Kimodo. The README tells you to drop it in front of any generator node in your own graphs, and the text_kimodo_multilingual workflow is the shipped example.
Installing and managing the download
Nodes via Manager (search "AnimoFlow") or git clone https://github.com/AnimoFlow/comfyui-animoflow.git, and the node pulls sentence-transformers from requirements.txt. The rewriter needs no Docker backend - it's a native node - so you can use it while the model containers are down.
If you don't want the 3.2 GB at all, set REWRITER_DISABLED=1 in the environment and every call becomes a pass-through. You can also point the sources elsewhere via REWRITER_MODEL_REPO, REWRITER_RETRIEVER_REPO, and REWRITER_CORPUS_REPO. One known limitation, straight from the README: the timeline node (AnimoFlow_PriorMDMTimeline) segments aren't rewritten in the GUI yet - a segments-aware variant is a known follow-up, so for now rewrite each segment's text yourself or rely on the API layer, which does per-segment rewriting.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | a person walks forward | Motion prompt in any language. Rewritten to a HumanML3D-style English caption. First rewrite of a non-English/free-form prompt downloads ~3.2 GB of rewriter weights from HF Hub (one-time). |
| mode | COMBO | auto | auto: rewrite unless the input already looks like a HumanML3D caption. force: always rewrite. skip: pass through unchanged. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| rewritten_prompt | STRING | — |
| rewrite_info | STRING | — |