Mpi Text
A multiline text box that lives on a wire
- Text
MpiText is the multiline cousin of MpiString: a big text box in, the same text out, no processing in between. Input string (multiline), output Text. Where MpiString is for short single-line values - filenames, tokens, one-word style names - MpiText is for the stuff you actually want to read and edit in a box: draft prompts, tag lists, blocks of text that get processed elsewhere.
The value is the wiring, not the node. Prompts in ComfyUI have an awkward habit of living in a widget on the CLIP Text Encode node, which makes them hard to share, hard to modify programmatically, and impossible to derive. Put a MpiText upstream and the prompt becomes a value that flows: the same text can feed a positive encoder, a whitelist checker (MpiTextContains), a tag joiner, or a prompt-processing node, all from one authoritative source. It's the same single-source-of-truth pattern the pack's other primitives use - the "one value, five consumers" move from the node-plumbing essay - applied to prose.
Why this one instead of MpiString?
Scroll up a schema and the whole difference is multiline: true vs false. It matters more than it looks: a multiline widget wraps and grows, so pasting a long comma-separated tag list into MpiText is pleasant, while the same paste into MpiString becomes one unwieldy line. The output socket type is STRING either way, so downstream nothing changes - it's purely an editing-experience choice. If your value has newlines, this is the node; if it's a short token, MpiString keeps the box compact.
Install
Ships with ComfyUi-MpiNodes. ComfyUI Manager (search "MpiNodes" or publisher "mad-pony-interactive"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/MadPonyInteractive/ComfyUi-MpiNodes
Restart ComfyUI. No dependencies - one multiline field, return (string,).
Anything to watch?
Not much, and that's the point. One habit worth adopting: since it outputs plain STRING, it drops naturally into the pack's prompt-processing line - feed its output into MpiTextContains for a whitelist gate, or into MpiTextListJoin/MpiTextListReplace if you're working with prompt lists rather than a single block. If you find yourself retyping the same prompt into three encoders, that's the sign to put this node in and wire it out.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| string | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Text | STRING | — |