ComfyUI Node

StringPass

A string that does nothing, and that's the point

By alexjx·Created 10 months ago·Updated 4 months ago· 0
StringPass
    • STRING
    string

    Every utility pack eventually ships a node whose entire job is to pass a value through untouched, and XJStringPass is this pack's contribution to that proud tradition. It takes a string in and hands you the same string back out. That's it. No parsing, no trimming, no uppercase, no side effects.

    So why would you install a pack for a glorified wire? Because "do nothing" is occasionally exactly the right behavior. ComfyUI's native String node doubles as a text editor - you can type into it - and there are times when that's a liability rather than a feature. XJStringPass is wired with forceInput, which means you can't type into it; the value has to come from another node. That converts it into a pure routing element.

    Where it actually earns its keep

    • Breaking long text chains. If you have a prompt string snaking through several nodes, dropping a pass-through between them makes the graph readable and gives you a spot to inspect intermediate values.
    • Avoiding accidental edits. The stock string widget invites clicking and editing. When a value is computed upstream and must not be hand-tweaked, a forced-input passthrough is a visible "hands off" signal.
    • Type stability in switches. When a switch or reroute needs a plain STRING and you're feeding it from something that outputs one, an explicit pass-through documents the intent.

    The single input is string (STRING, optional - leave it unwired and you'll get None through, which is rarely what you want). The single output is STRING.

    Installing it

    It's part of ComfyUI-XJNodes, so you install the pack once:

    cd ComfyUI/custom_nodes
    git clone https://github.com/alexjx/ComfyUI-XJNodes
    

    then restart ComfyUI (or ComfyUI Manager → ComfyUI-XJNodes). Zero dependencies, zero models - it's a one-function class.

    Common issues

    The only real "gotcha" is misunderstanding what forceInput means: if you expected to type a string into the node and can't, that's by design. Wire it from a source and you're good. And don't go looking for transformation options - if you need to modify text, this isn't the node; the pack's own JSON extractor and the broader ecosystem's text tools are the right call. For a do-nothing utility, that's a remarkably complete troubleshooting section.

    CategoryXJNodes/util

    Inputs (1)

    NameTypeDefaultDescription
    stringoptSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING