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

Primitive (STRING)

A text primitive that actually reroutes cleanly

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

    Here's a ComfyUI quirk that trips people up constantly: right-click a widget, hit "Convert to Input," and you get a native Primitive node - but try to run that Primitive through a Reroute node and it just won't connect. That's not a bug you're hitting, it's how native primitives work: they're dynamically typed until something downstream locks them in, and Reroute needs to know the type up front to draw the socket. This pack exists purely to fix that one annoyance. Its own author put it plainly when he shipped it: he got discouraged by wire spaghetti, figured reroutes-with-primitives would fix it, then discovered reroutes and primitives don't talk to each other - so he built a set of primitives with a fixed, predeclared type instead. StringStaticPrimitive is the plain-text member of that set.

    What it actually is

    Functionally it's about as simple as ComfyUI nodes get: one text field in, one text field out. The difference from a bare CLIP Text Encode widget or a native primitive is entirely about the graph, not the value. Because its type is nailed down as STRING from the moment you place it - not inferred from whatever you happen to wire it to - you can drop a Reroute node right after it and keep going, which means you can push a value across a busy canvas without a wire crossing six other nodes to get there.

    Inputs and outputs

    There's exactly one field: Input_STRING, a single-line text box (no multiline flag on this one - that's a separate node in the pack). Whatever you type becomes the node's single output, also called STRING. Wire that into anything expecting plain text - a filename_prefix, a converted-to-input text field on a styler node, a positive/negative prompt slot on a text encoder, whatever needs a string and isn't picky about where it came from.

    The practical use people actually report: set your value once in a StringStaticPrimitive, wire it to several places that need the same string, and change it in one spot instead of hunting down five duplicated text fields. Group a handful of these - plus the Int, Float, and collection primitives from the same pack - inside a ComfyUI group node, collapse it, and you've effectively built a single settings panel for your whole workflow. One user compared it to a Houdini null: a single controller node driving several downstream fields at once. That's the whole appeal in one sentence.

    Installing it

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

    Or manually:

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

    then restart. No requirements.txt, no model downloads, nothing to configure - it's pure Python UI logic. After restart you'll find every node in this pack under a new primitives category in the Add Node menu.

    Where people get tripped up

    Expecting it to double as a general-purpose primitive. It doesn't, on purpose. A native ComfyUI primitive can morph into whatever type it's first connected to; this one is locked to STRING forever, which is exactly the trade that makes it reroute-compatible. If you need a value that adapts to different socket types depending on where you drop it, this isn't that node - go back to the stock primitive.

    Pasting multi-line text into a single-line field. This node's box is single-line by design. If what you're storing has real line breaks - a longer prompt, a list - reach for its sibling, StringMlStaticPrimitive, instead of fighting this one.

    Not realizing rgthree-comfy ships something similarly named. If you're already running rgthree-comfy - most people are, it's the default "graph tidying" pack - it lists a Power Primitive node in its own inventory. It's worth a quick look before you install a second pack to solve what might be the same problem; this one's value is being small, dependency-free, and doing exactly one thing if rgthree's version doesn't cover your case.

    A value not showing up downstream. Ninety-nine times out of a hundred that's a dangling or misrouted wire, not this node - it has no logic to break. Check the connection before you start debugging the node itself.

    Categoryprimitives

    Inputs (1)

    NameTypeDefaultDescription
    Input_STRINGSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING