State Text Box
The prompt template node that keeps library prompts on disk
- state_control
- text
State Text Box is the editable prompt-template node for the State Manager. You type a positive or negative prompt here, the manager can save it as part of a character preset, and the node hands the text to your prompt or wildcard path. Its job is to keep prompt templates out of the workflow JSON and inside the persistent library - so you can swap a whole character's prompts from one dropdown instead of editing a chain of CLIP Text Encode nodes.
How it works
Three required inputs: role (an enum of positive, negative, or generic - which tells the manager which template slot this box maps to), text (a multiline STRING where the prompt lives), and state_slot (a name so a single graph can have several boxes and the manager knows which is which). There's one optional input, state_control (STATE_MANAGER_CONTROL), which does two things: it's the editor-only link the manager's Save connected / Load connected actions use to find the node, and when connected it carries the resolved text from saved state at runtime. The single output is text (STRING).
So unmanaged, the node is just a multiline text holder that outputs what you typed. Managed, the text you see is overridden by whatever the selected preset stores for that role and slot. That's the whole trick - same node, but the source of truth shifts from the widget to the library.
Wiring
The README's recommended shape:
State Manager.state_control → State Text Box.state_control
State Text Box.text → Wildcards Processor → CLIP Text Encode
Put your raw wildcard/template prompt in the text box, let your wildcard processor expand it downstream, and feed the result to the encoder. Add separate boxes for positive and negative (set role accordingly), and use distinct state_slot values if you want multiple prompt templates in one graph.
The trap: don't route wildcard-processed output back into the State Manager. The manager has no runtime capture inputs, so that feedback shape isn't part of the design - store the raw template here and expand it after. Also note the node isn't a general text transformer; if you're not using the State Manager at all, a plain multiline primitive does the same job with less machinery.
Install
Part of the ComfyUI-DoRA-Dynamic-LoRA-Loader pack. Install it via ComfyUI Manager (search ComfyUI-DoRA-Dynamic-LoRA-Loader) or:
cd ComfyUI/custom_nodes
git clone https://github.com/xmarre/ComfyUI-DoRA-Dynamic-LoRA-Loader
Restart ComfyUI. No model files, no extra Python packages - the whole pack is self-contained.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| role | COMBO | positive | 3 options: positive, negative, generic |
| text | STRING | — | |
| state_slot | STRING | default | — |
| state_controlopt | STATE_MANAGER_CONTROL | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |