ComfyUI Node

Show String

The debugging node that sees text without breaking the wire

By yanhuifair·Created 2 years ago·Updated 3 months ago· 2
Show String
    • string
    string

    Every ComfyUI workflow eventually lies to you. The prompt you think is going into the sampler isn't what's going in - a template didn't resolve, a wildcard came back empty, a translation dropped a phrase. The FairLab Show String node is the lie detector: it displays a string right on the node's UI panel and forwards the same string downstream, so you can tap the middle of a pipeline and see exactly what's flowing without rerouting anything.

    The pass-through is the feature. A lot of "show text" nodes are sinks - they display and stop. This one is OUTPUT_NODE, displays the text in the UI, and still hands the identical string to whatever comes next. Slap it on a wire, run once, read the value, delete it. Zero rewiring.

    How it works

    The node takes one string input and returns two things: a ui payload that renders the text on the node, and the same string as its output socket. ComfyUI's standard UI-dict mechanism - the same one Preview Image uses - is what paints the text onto the node face. Nothing custom in the JS, which is nice for a change; the pack's frontend extension is mostly for its image-download node, and this one rides the built-in display path.

    The input that matters

    • string - a STRING socket marked forceInput. That flag is worth knowing: you can't type into this node. It must be wired. If you want a text box and a display, put a String node in front and wire it in.

    The single output is the same string, unchanged. So the node sits transparently in a data path: String → Show String → String Append → CLIP Text Encode displays the base prompt at the point you inserted it, and everything downstream keeps working as if it weren't there.

    When you'll actually use it

    • Debugging whether a chained String Append produced the spacing you expected.
    • Confirming a String Translate output before it feeds the encoder.
    • Checking that a tag-cleaning node like Unique Tags didn't wreck your ordering.
    • Verifying a value read from disk via Load String before you trust it.

    Because it's an output node, the graph will execute down to it - which is precisely what you want in a debug tap. The cost is negligible; the value is knowing what your text actually is at that point in the graph, not what you assume it is.

    Installing it

    One pack, all nodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yanhuifair/ComfyUI-FairLab.git
    cd ComfyUI-FairLab
    pip install -r requirements.txt
    

    Restart ComfyUI, or search "ComfyUI-FairLab" in Manager. No dependencies specific to this node.

    Gotchas

    The forceInput constraint catches people - if you drop this node expecting a text box, you get an empty socket instead. And the display only updates when the graph runs, so if you edit an upstream value, hit Queue again before you trust what's on the panel. Both are minor; the node does one thing and does it transparently.

    CategoryFair/string

    Inputs (1)

    NameTypeDefaultDescription
    stringSTRING

    Outputs (1)

    NameTypeDescription
    stringSTRING