ComfyUI Node

String Relay

Pass a string through unchanged, or park a constant on the wire

By longgui0318·Created 2 years ago·Updated about a year ago· 1
String Relay
    • STRING
    string_

    "String Relay" is an identity node for text: a string goes in, the same string comes out, zero processing. It's part of a family of typed relays in this pack (image, mask, int, float, string), and like the others its job is graph organization, not content.

    Strings are the most common type to want a relay for, honestly. Prompts, filenames, seeds-as-text, template variables - text wires snake across a graph constantly, and a relay gives you a labeled, visible anchor to break one without losing the value, or to park a constant string on a wire. Same trick as its siblings: because the input is a widget with a default, you can just type "cinematic, soft light" into it and use the node as a plain STRING source without touching a Primitive node.

    How it works

    return (string_,). No copying, no validation - the exact string flows out.

    Inputs and output

    • string_ (STRING, default "") - feed from any text node, or type straight in.
    • STRING - unchanged.

    When you'd reach for it

    Same three cases as the other relays: cleanup of crowded graphs, a fixed text value where you don't want Primitive's widget conversion in the way, and keeping a value alive while you swap out the node that used to produce it. One small advantage specific to strings: it's a cheap way to document a value - a relay labeled in your own scheme sitting on a prompt wire is easier to spot than a floating Reroute.

    The honest take

    Core ComfyUI's Reroute covers most of this for free, so this is a convenience node, not a capability. If you never feel the itch to organize text wires, you won't miss it. It's there for when the graph is the problem.

    Installing it

    It's part of longgui0318/comfyui-common-util:

    cd ComfyUI/custom_nodes
    git clone https://github.com/longgui0318/comfyui-common-util
    cd comfyui-common-util && pip install -r requirements.txt
    

    Restart after, or install via ComfyUI Manager by searching "comfyui-common-util". requirements.txt lists only opencv-python, but the pack imports scipy, scikit-image, and PyWavelets at load - if it won't load, pip install scipy scikit-image PyWavelets then restart.

    Categoryutils

    Inputs (1)

    NameTypeDefaultDescription
    string_STRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING