Mustache Var
Define one {{variable}} and pipe it through every prompt
- vars_in
- vars
Mustache Var is the pack's simplest way to make a named variable: type a name, type a value, and the node emits a SIMPLECHAT_VARS dict containing {name: value} that any SimpleChat node will substitute when you write {{name}} in a prompt. It's the manual variable source - the counterpart to JSON -> Vars, which builds the same dict from a JSON blob. One node, one variable, zero ambiguity.
The two fields
name- the variable key. You'll write{{name}}in prompts to reference it. (The default value is literally自定义胡子变量, i.e. "custom mustache variable" in Chinese - change it, unless you enjoy typing that in your prompts.)value- what it substitutes to. Multiline, so it can hold a whole paragraph.
Output is vars on the SIMPLECHAT_VARS type. There's also an optional vars_in input, so you can daisy-chain several Mustache Var nodes: node A's output feeds node B's vars_in, and B merges in its own variable - chain as many as you need to build up a small dictionary before it hits a chat node.
Where it fits
It's the "set once, reuse everywhere" node. Define a character name, a base quality tag block, a fixed negative prompt, or a seed value once, then reference {{name}} across every Chat, Chat with Image, and Gemini Image Gen prompt in the graph. Change the value in one place and every consumer updates on the next run. In the Anima workflow it's how you pin a variable like {{artist}} before sending the prompt to the LLM - inject it, and the model writes around your fixed tag.
Compared to JSON -> Vars, this is the manual, readable, no-JSON option. Compared to Mustache Render, it doesn't do any rendering itself - it just defines the variable; the chat nodes do the substituting. If you need to render {{var}} in arbitrary text outside a chat node, that's Mustache Render's job.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/Moeblack/ComfyUI-SimpleChat
Restart, or use Manager and search "ComfyUI-SimpleChat". Only dependency: aiohttp.
Gotchas
A blank name is silently dropped - you get an empty dict rather than an error, which is a confusing way to discover you forgot to type a key. Values are always strings, so numbers come out as text (usually fine for prompts, occasionally annoying for numeric slots - those you'd feed directly instead). And the merge only happens through vars_in chaining; two Mustache Var nodes pointing at the same chat node with no chain between them don't merge - each delivers its own single-key dict, and a second connection overwrites, so keep them chained.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| name | STRING | 自定义胡子变量 | — |
| value | STRING | — | |
| vars_inopt | SIMPLECHAT_VARS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| vars | SIMPLECHAT_VARS | — |