Nodes/ComfyUI-Helper-Nodes/String Literal (multi-line)
ComfyUI Node

String Literal (multi-line)

A string literal for when you need actual paragraphs

By teward·Created 2 years ago·Updated 2 years ago· 9
String Literal (multi-line)
    • STRING
    string

    The multiline half of the Helper-Nodes string pair. Where HelperNodes_StringLiteral insists on one line, this one hands you a proper text box: type as much as you like, hit Enter, go nuts. Same one-string-out shape, but built for actual content rather than filenames and tokens.

    The mechanism is identical to its sibling - a required string input with multiline enabled, echoed out unchanged as a STRING output. No parsing, no formatting, no newline mangling. What you type is what comes out, newlines included.

    Inputs and outputs

    • string - required, multiline STRING.
    • STRING output - the text, unchanged.

    The honest take

    Here's the thing: for a prompt, this is usually the wrong tool. Prompts belong in CLIP Text Encode or HelperNodes_Prompt, which hand their output to conditioning directly. The multiline literal shines when you need a block of text on a wire for something that isn't a prompt - a long caption you're passing to a captioning or tagger node, a chunk of text for a custom node that ingests free-form input, or any value where single-line just isn't enough room.

    The genuinely useful property, shared with its sibling: the text becomes a visible, labeled node in your graph instead of hiding inside some other node's widget. When you reopen a workflow three weeks later and need to know exactly what a branch was fed, a node named "caption" beats a mystery widget every time.

    One fair warning: because there's no validation here, whatever consumes this string is on its own. If a downstream node chokes on the newlines, check the consumer, not this node - it's doing exactly what it says.

    Install

    Search ComfyUI-Helper-Nodes in ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/teward/ComfyUI-Helper-Nodes
    

    Restart afterwards. Dependencies: numpy, pillow, piexif, whratio; the extra two beyond ComfyUI's built-ins install via Manager. No models to download.

    Troubleshooting

    Very little to go wrong. The main thing to remember is that multiline is intentional here - if a node downstream is behaving oddly with whitespace, that's the consumer not trimming, not this node adding anything.

    CategoryComfyUI-Helper-Nodes/util

    Inputs (1)

    NameTypeDefaultDescription
    stringSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING