Nodes/ComfyUI-Static-Primitives/Primitive (STRING MULTI-LINE)
ComfyUI Node

Primitive (STRING MULTI-LINE)

The reroute-friendly text box for prompts and paragraphs

By 80sVectorz·Created 3 years ago·Updated about a year ago· 11
Primitive (STRING MULTI-LINE)
    • STRING
    Input_STRING

    This is the same idea as StringStaticPrimitive, sized up for actual paragraphs instead of a single line - your box grows, wraps, and accepts line breaks properly. Everything else about why it exists is identical, so it's worth saying once: ComfyUI's built-in Primitive nodes (the ones you get from right-clicking a widget and choosing "Convert to Input") are dynamically typed, and Reroute nodes need a fixed type to draw their socket correctly. Put a native primitive through a Reroute and it just refuses to connect. The pack's author ran into exactly that while trying to de-spaghetti his own workflows, and built a set of primitives with the type nailed down in advance instead. This is the multi-line text member of that set.

    Why the multi-line version matters

    A single-line field will technically accept a long string, but it renders it squashed onto one row and can behave unpredictably with real line breaks pasted in - different frontends handle it differently, and none of them handle it well. If what you're storing is a full prompt, a block of negative terms, a multi-line note, or anything a human would actually want to read back later, this is the node that's built for it. The field grows with your text and preserves line breaks the way you typed them.

    Inputs and outputs

    One field: Input_STRING, with the multiline flag set - a resizable text area rather than a single row. One output, also STRING. That output is a plain string type, so it wires into anything expecting text: a CLIP Text Encode's text field once converted to input, a prompt slot on a styler node, a filename_prefix, or a debug/print node if you just want to eyeball what's flowing through.

    The pattern worth knowing: because the type is locked to STRING from the start, you can park this node somewhere convenient on your canvas, run a Reroute off it to wherever your actual encoder lives, and keep a tangled graph legible. It also groups well with the pack's other primitives - an Int for steps, a sampler collection primitive, this for your prompt - collapsed into one node that acts like a settings panel at the top of the workflow.

    Installing it

    ComfyUI Manager - search ComfyUI-Static-Primitives, install, restart.

    Manual:

    cd ComfyUI/custom_nodes && git clone https://github.com/80sVectorz/ComfyUI-Static-Primitives.git
    

    Restart. No requirements.txt, no models, nothing to configure beyond placing the node - it's pure UI/Python logic. Look for it, and everything else in the pack, under the primitives category once ComfyUI reloads.

    Where people get tripped up

    Using the single-line version for a prompt out of habit. If your text has line breaks or is genuinely long, this multiline node is the one you want - the single-line StringStaticPrimitive is for short values like filenames or tags, not paragraphs.

    Expecting it to do anything to the text. It doesn't reformat, trim, wrap for token limits, or validate anything - it's a pass-through. Whatever you type is exactly what comes out the other side. If you need actual text processing (concatenation, wildcards, templating), that's a different node entirely; this one's whole job is just holding a value with a fixed type so it can survive a Reroute.

    A wall of text making the node unwieldy on a crowded canvas. That's expected - the box grows to fit content. If it's dominating your view, collapse the node (or the group it's sitting in) once you've set the value; you don't need it expanded to keep working.

    Nothing reaching the downstream node. As with the rest of this pack, this node has no logic to fail - check the wire is actually connected to the socket you expect before assuming the node is at fault.

    Categoryprimitives

    Inputs (1)

    NameTypeDefaultDescription
    Input_STRINGSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING