ComfyUI Node

🛡️Set Text

A text box that actually outputs text — Set Text, the string source every graph needs

By KoreTeknology·Created 2 years ago·Updated 2 years ago· 16
🛡️Set Text
    • Output String
    user_inputMy Text

    ComfyUI hands you a text field on the CLIP Text Encode node and then acts surprised when you want a string somewhere else. Set Text is the fix: a multiline box that produces a STRING you can wire to any string input. Type, connect, done. If it sounds too simple to write an article about, you've clearly never needed the same filename in three different nodes.

    What it does

    One input, one output:

    • user_input - a multiline STRING, default "My Text". This is what you type.
    • Output String - a STRING output. The pass-through.

    That's the entire mechanism. process_string returns whatever you typed, untouched. There's no templating, no formatting, no list handling - it's a text source and nothing else.

    Why you'd reach for it

    The use case is when a string needs to live in more than one place, or when it's easier to keep a value visible at the top of a graph than buried in a node's widget. Classic examples:

    • One master text box feeding the positive prompt, a filename prefix, and a caption-save node, so changing one word updates all of them.
    • A reusable prompt fragment - the "style block" - that you drop into several text encodes.
    • Teaching or sharing workflows, where a labeled, movable text box is friendlier than a prompt widget nested inside an encoder.

    It pairs naturally with its pack-mate Get Text, which does the opposite: displays a string that flows into it. Together they're the two bookends of "strings you can actually see in a graph."

    The honest review

    This is a deliberately minimal node, and that's a feature until it isn't. If you want string formatting, concatenation, or multi-output text utilities, you'll outgrow it fast and reach for something like rgthree's text utilities or a text manipulation pack - the community has a lot of those, and they do a lot more. But for "I just need a string I can point at things," Set Text is zero-friction and has nothing to break. About the only surprise is that vanilla ComfyUI doesn't already have this exact node; it's the kind of trivial utility you install a whole pack for and then use in every workflow.

    One small thing: the class name is Set Text (with a space), which is also what appears in workflow JSON and the node menu. If you're grepping a saved workflow for it, don't search for SetText.

    Install

    Part of the ComfyUI Production Nodes Pack by Uriel Deveaud (KoreTeknology). Install via ComfyUI Manager (search "ComfyUI Production Nodes Pack") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/KoreTeknology/ComfyUI-Nai-Production-Nodes-Pack
    cd ComfyUI-Nai-Production-Nodes-Pack
    pip install -r requirements.txt
    

    Restart ComfyUI afterward. No model downloads, no dependencies beyond the pack's standard requirements - this node is pure Python, no PIL, no torch math worth mentioning. Find it under utils; the pack files everything into existing menu categories instead of creating a new root folder, so your node menu doesn't fill up with pack names. Pre-alpha pack, but a string pass-through is as close to bug-proof as a custom node gets.

    Categoryutils

    Inputs (1)

    NameTypeDefaultDescription
    user_inputSTRINGMy Text

    Outputs (1)

    NameTypeDescription
    Output StringSTRING