ComfyUI Node Runs on cloud

String

The text node at the root of every prompt branch

By theUpsider·Created 3 years ago·Updated about a year ago· 234
String
    • STRING
    value

    String is a multiline text box that hands you back exactly what you typed. Input value (a STRING, default empty, multiline enabled), output STRING, and the implementation is a straight return (value,). Boring on purpose - because the interesting stuff is what you do with the string once it's on a wire.

    The classic use is prompt branching. You want one workflow that can produce, say, a clean product shot or a moody editorial depending on a condition. You put two different prompts in two String nodes, an If node picks between them based on a Compare result, and the winning text flows into a CLIP Text Encode. The String node is what makes that possible - it turns a prompt you can see and edit into a value the graph can route, instead of a prompt locked inside a text-encode node somewhere in the middle of the graph.

    What it won't do

    • No substitution. This is plain text. The {a|b|c} wildcard syntax that Impact Pack popularized lives in other packs - don't expect this node to expand anything. What you type is what comes out.
    • No conversion. A string stays a string. If you need a number out of "42", that's a different tool; String won't cast for you.
    • No concatenation. It holds one value; joining two strings is a job for a text-combine node.

    In short, it's a text holder with a typed output, and in a logic-heavy workflow that's exactly the primitive you keep reaching for.

    Install

    Same as the rest of the pack - ComfyUI Manager, search ComfyUI-Logic; or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/theUpsider/ComfyUI-Logic
    

    Restart ComfyUI. There's no requirements.txt and nothing to download - the pack is a single Python file, so this installs cleanly with zero dependency risk. One caveat, shared across the whole pack: the repo header says "currently not maintained," so don't expect feature updates. For plain text in and text out, that hasn't mattered yet. And if you're building fresh, ComfyUI core's own text-handling nodes may cover you without a custom pack at all.

    CategoryLogic

    Inputs (1)

    NameTypeDefaultDescription
    valueSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING