Nodes/MachinePainting Nodes/πŸ‘Ύ Text String
ComfyUI Node

πŸ‘Ύ Text String

The plain-text node ComfyUI forgot β€” a string you can actually reuse

By machinepaintingΒ·Created 10 months agoΒ·Updated 4 months agoΒ· 9
πŸ‘Ύ Text String
    • STRING
    β—„textβ€”β–Ί

    ComfyUI can be weirdly stingy with plain string outputs. The built-in CLIPTextEncode takes text, but if you want to reuse a string - feed the same filename, the same prompt fragment, the same negative into three places - you end up retyping it or reaching for a pack that treats text as an afterthought. πŸ‘Ύ Text String is the unglamorous fix: a multiline text box that outputs a STRING. No encoding, no parsing, just a string on the wire that any downstream node can consume.

    What it is

    One required input, text (multiline), one output: STRING. Type it, wire it, done. The source is a straight pass-through - the node reads the text field and returns it as a string output, which means anything that accepts a STRING input can receive it. That includes prompt encoders (if the node splits positive/negative conditioning), filename builders, wildcard processors, and any custom node that takes a string parameter.

    Why you'd use it over typing inline

    Most nodes with a string input show a text box on the node itself, so on the surface this looks redundant. The payoff is one source, many consumers. Put your filename or your recurring prompt in a single Text String, wire it to four places, and change it once. It also keeps text inputs visible - when a long prompt is buried in a node's collapsed widget, it's easy to lose track; an explicit Text String on the canvas makes the text a first-class citizen you can read at a glance. For anyone building workflows that get shared, it's also the difference between a JSON with text embedded in widgets and a JSON where the text is a named node.

    It pairs with the pack's other text utilities: Text Notes for documentation, Show Text for inspecting strings mid-graph (with passthrough for chaining). Text String is the supply side of that family.

    Installing it

    Ships in the MachinePainting Nodes pack. ComfyUI Manager β†’ search "MachinePaintingNodes", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/machinepainting/ComfyUI-MachinePaintingNodes.git
    

    Restart ComfyUI. No meaningful dependencies - it's a text field.

    Gotchas

    • Multiline is on, but some consumers want single-line. A multi-line string wired into a filename node will usually fail or mangle the name. If you're feeding filenames, keep the text single-line.
    • It's static text, not a template. No variables, no formatting. If you need a string built from parts, look at a text-combining node - this one is a raw string source.
    • No type magic. It outputs STRING, and some nodes want a different text-ish type - check the input type before wiring and convert if needed.

    There are fancier text nodes in the ecosystem (wildcard processors, template engines), but this is the one you reach for when you just need a string on the canvas. Boring on purpose, useful every time.

    CategoryMachinePaintingNodes/Util

    Inputs (1)

    NameTypeDefaultDescription
    textSTRINGβ€”

    Outputs (1)

    NameTypeDescription
    STRINGSTRINGβ€”