ComfyUI Node

Text Passthrough

The wire-tidy node for your strings

By wenchengxiang·Created about a month ago·Updated a day ago· 1
Text Passthrough
    • text
    text

    Text Passthrough takes a string on one side and returns the identical string on the other. No find-and-replace, no case changes, no formatting - a pure relay. It's one of a dozen generated passthrough nodes in this pack (one per data type: IMAGE, MASK, LATENT, CLIP, MODEL, VAE, text, int, float, bool, audio), and its only job is to rearrange your graph, not your data.

    The honest pitch is the same as every passthrough: legibility. Text is the most-wired data type in ComfyUI - your prompt string fans out to a positive encoder, a negative encoder, a filename prefix, a note node, a prompt-book router - and those wires cross the canvas like a tangle of loose spaghetti. A passthrough breaks one long run into two shorter segments and gives the wire a corner to turn. It's a reroute with a typed face, which matters more than it sounds: when the graph is a wall of noodles, a labeled "text enters this subgraph here" node is a landmark you can find again. That's the "fight illegibility" purpose from the whole plumbing layer in miniature.

    There's also the one-source trick. Wire your master prompt through a Text Passthrough once, then branch all consumers off that single output. Now there's exactly one place that prompt enters the graph - and one place to check when the image doesn't match the words you typed. If you've ever changed a prompt in two of three places and stared at a half-updated image, you know why that's worth having.

    How it works

    The text input is a STRING, marked optional and forceInput. The node returns whatever arrived, or None if nothing is connected. Because the input is optional, an unwired passthrough doesn't crash - it quietly passes None, which downstream nodes treat as "not connected." Useful while you build; just don't leave it dangling and then wonder why a prompt suddenly vanished.

    One input, one output, both named text. That's the entire interface.

    How to install it

    Part of ComfyUI-Practical-Tools by wenchengxiang. ComfyUI Manager → search ComfyUI-Practical-Tools → install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/wenchengxiang/ComfyUI-Practical-Tools
    

    No dependencies beyond the standard library, no downloads.

    Common issues

    • "My prompt disappeared." If you leave the input unwired, the output is None - a CLIP Text Encode fed None fails (or encodes nothing) downstream. A passthrough isn't a text source; it needs a real upstream string.
    • It won't fix or transform text. If you want find-and-replace, reach for the pack's Prompt Replace; if you want to merge two strings, that's a concat node. Passthrough is for routing, not editing - knowing which is which saves you a wasted search.
    • Not a switch. A passthrough can't choose between two prompts. If you need "prompt A or prompt B depending on a condition," that's an A/B switch node, not this.
    CategoryPractical-Tools/Passthrough

    Inputs (1)

    NameTypeDefaultDescription
    textoptSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING