Anima Prompt Router (Editable)
Let the LLM draft, then you override and lock whatever it keeps changing
- quality_meta_year_safe
- count
- character
- series
- artist
- style
- environment
- tags
- neg
- positive
- negative
- vars
- obj
- json_text
- appearance
LLM prompt generators have a nasty habit: you ask for a character, it gives you one, and on the very next run it gives you a different one. Same words in your system prompt, different artist tag, different hair color - because that's what models do. Anima Prompt Router (Editable) is this pack's answer: it parses an Anima-style JSON prompt into its named parts and puts you in charge of which parts actually reach the sampler, with two tools - manual overrides and lock latches.
What the two tools do
Think of it as a mixer board for the eight prompt segments (quality/meta/year/safety, count, character, series, artist, style, environment, tags, neg, plus an appearance field).
- Overrides are just text fields:
override_artist,override_style, and so on. Fill one in and it replaces whatever the LLM produced for that segment, every run. This is how you say "nice draft, but the artist is always going to be@xxx, no discussion." - Locks are the cleverer bit. Flip
lock_artistand the node latches the current artist value - on the next run, even if the JSON brings a new artist, the output keeps the one it latched. It's a sticky "freeze this field" that survives fresh LLM output.reset_latches(default off) clears all of them when you want to thaw the board.
The node then rebuilds positive and negative from the final parts, so everything downstream stays consistent even though you've surgically edited a JSON you never saw.
Outputs
This node is generous with ports: each part comes out individually (quality_meta_year_safe, count, character, series, artist, style, environment, tags, neg, appearance), plus the assembled positive / negative, a vars dict for Mustache templating, the raw parsed obj, and the updated json_text if you want to log or reuse it.
Why the latch matters in practice
The realistic workflow is a loop: Chat → LLM JSON → this node → sampler. If you're hunting for the right background, the LLM will keep drifting the character too, and every drift is a wasted render. Lock character and artist, let environment float, and each run now varies only what you're testing. That's the difference between "LLM roulette" and an actual controlled experiment - and it's the reason this node exists rather than you just pasting JSON into Prompt JSON Unpack.
Installing and gotchas
cd ComfyUI/custom_nodes
git clone https://github.com/Moeblack/ComfyUI-SimpleChat
Restart, or grab it via Manager ("ComfyUI-SimpleChat"). Only dependency: aiohttp.
The gotcha is that latches live in node instance memory. They survive re-executions of the same workflow, but they do not survive saving and reloading the workflow - a fresh node instance starts with an empty latch table, so your carefully pinned artist silently unpins itself after a restart. If that happens, re-check your lock toggles; the lock flag itself is stored in the workflow, but the latched value was in RAM. Also, all the lock_* and override_* toggles only apply to the Anima segment names; if your LLM's JSON uses different keys, those parts come through empty and you'll be overriding everything from scratch.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| json_text | STRING | — | |
| strip_code_fence | BOOLEAN | true | — |
| reset_latches | BOOLEAN | false | Clear all locked(latched) values. |
| lock_qualityopt | BOOLEAN | false | — |
| lock_countopt | BOOLEAN | false | — |
| lock_characteropt | BOOLEAN | false | — |
| lock_seriesopt | BOOLEAN | false | — |
| lock_artistopt | BOOLEAN | false | — |
| lock_styleopt | BOOLEAN | false | — |
| lock_environmentopt | BOOLEAN | false | — |
| lock_tagsopt | BOOLEAN | false | — |
| lock_negopt | BOOLEAN | false | — |
| override_qualityopt | STRING | — | |
| override_countopt | STRING | — | |
| override_characteropt | STRING | — | |
| override_seriesopt | STRING | — | |
| override_artistopt | STRING | — | |
| override_styleopt | STRING | — | |
| override_environmentopt | STRING | — | |
| override_tagsopt | STRING | — | |
| override_negopt | STRING | — | |
| lock_appearanceopt | BOOLEAN | false | — |
| override_appearanceopt | STRING | — |
Outputs (15)
| Name | Type | Description |
|---|---|---|
| quality_meta_year_safe | STRING | — |
| count | STRING | — |
| character | STRING | — |
| series | STRING | — |
| artist | STRING | — |
| style | STRING | — |
| environment | STRING | — |
| tags | STRING | — |
| neg | STRING | — |
| positive | STRING | — |
| negative | STRING | — |
| vars | SIMPLECHAT_VARS | — |
| obj | SIMPLECHAT_JSON | — |
| json_text | STRING | — |
| appearance | STRING | — |