Anima Prompt Formatter
Anima hates messy tag formatting — this node cleans it up for you
- formatted_text
Anima is a great model with one genuinely weird quirk: it's picky about whitespace, commas and line breaks in a way that Illustrious and NoobAI never were. If you've pasted a multi-line prompt into the CLIPTextEncode, gotten something garbled out, and muttered "why is this model so fragile," this is the fix. AnimaPromptFormatter is a one-node pack that takes whatever sloppy text you typed and turns it into the clean tag1, tag2, tag3 format Anima wants.
The author built it for a very specific reason: he was coming from NoobAI XL, where his tagging habits "just worked," and Anima kept tripping on the exact same text. It's a formatting node for the rest of us who write prompts like a person and not like a machine.
What it actually does
One string in, one string out, no GPU, no model files, no API key. It runs four rules on your prompt text:
- Kills every line break (
\n,\r). - Makes sure there's exactly one space after each comma.
- Strips spaces sitting before commas.
- Drops the empty tags that consecutive commas create.
So this mess:
tag1,tag2, tag3
,tag4,,tag5
becomes:
tag1, tag2, tag3, tag4, tag5
That's the whole thing. It doesn't add a quality prefix, doesn't sort your tags, doesn't translate natural language. Pure hygiene.
How it works
Under the hood it's embarrassingly simple Python - string replace, a split on commas, a strip and filter pass, and a rejoin. That's the whole mechanism, and it's why there are no dependencies to fight with. The one implementation detail worth knowing: newlines are replaced with a space, not a comma. The README's example only looks clean because the line break happened to sit right before a comma.
The inputs and outputs
The whole schema is one field.
- text - required, a multi-line
STRING(defaults to empty). This is where you paste or wire in your prompt. It can come from your own typing or from another text-producing node, since it accepts a normal string input. - formatted_text - a
STRINGoutput. Wire it into thetextinput of a CLIPTextEncode node and you're done. You can also route it into a "show text" debug node to eyeball what the formatter actually produced before you burn a generation.
Installing it
Easiest path is ComfyUI Manager: search for ComfyUI-AnimaPromptFormatter and install. Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/1lch2/ComfyUI-AnimaPromptFormatter
Then restart ComfyUI. That's it. There's no requirements.txt, no model to download, no ComfyUI version requirement - it's pure standard-library string handling, so it works everywhere and can't break on updates. The node shows up under prompt/formatter as "Anima Prompt Formatter."
Where people get burned
Two real gotchas, both from reading the code rather than the README:
- A line break that isn't next to a comma merges two tags.
blue eyes\nwhite glovesbecomesblue eyes white gloves, a single tag - no comma inserted. If you keep your tags on separate lines, they still need commas between them. The node normalizes your formatting; it doesn't invent separators for you. - It won't fix underscores. Anima's prompting advice is to drop underscores entirely, but this node only touches commas and whitespace. If your prompts are full of
white_gloves, run them through something that swaps underscores for spaces first, or this formatter will happily pass them through untouched.
It also leaves parenthesis weights like (tag:1.2) alone, which is exactly what you want - formatting and weighting are separate concerns.
Should you install it?
Honestly, it's a "you'll either never need it or reach for it constantly" node. If you're the kind of person who writes one-line comma-perfect prompts, skip it - Anima will be fine. If you build prompts in a text editor one tag per line, copy from CivitAI descriptions, or get your prompts out of an LLM with sloppy spacing, this saves you from thinking about it at all. It's the rare utility that's so boring and correct you'll forget it's in your graph - which is the point.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| formatted_text | STRING | — |