ComfyUI Node

String Textbox

The most boring node in ComfyUI, and you'll use it constantly

By bradsec·Created 2 years ago·Updated 2 months ago· 36
String Textbox
    • output_string
    input_string

    Let's be honest about this one up front: the String Textbox is an identity function in a trench coat. You type text, it hands the text back. No API, no model download, no dependencies, no magic. It exists because ComfyUI is a graph and graphs need places to hold things - and for the other nodes in this pack, which all take a wired input_string, it's the natural starting point.

    Where it actually earns its keep is as a single source of truth. Type your prompt once, wire output_string to a String Strip, a String Multi Replace, and a CLIPTextEncode at the same time, and you edit in exactly one place instead of chasing three widgets. That matters more than it sounds when you're feeding one LLM-generated prompt through a cleanup chain and want to see it before and after. It's also the honest answer to "why does this node exist when I can just type into the text field on the KSampler": you can, but a standalone textbox survives graph re-wiring, gets shared in exported workflows cleanly, and gives the processing nodes in this pack the wire input they insist on.

    How it works

    It's one function, pass_string, which returns whatever it was handed. That's the whole mechanism - which is a feature. There's no hidden state, no caching, no surprise normalization. What you type is exactly what comes out the other side, and because the pack is pure standard-library Python, there's nothing to go wrong.

    The one real input is input_string (a multiline field, empty by default). There's a single output, output_string (type STRING), which you wire into anything that accepts a string: the other StringEssentials nodes, a CLIP text encoder, or a wildcard/LLM node that consumes text.

    Installation

    No dependencies, no model files - this pack is just Python and a bit of JS, so installation is about as painless as custom nodes get. Easiest via ComfyUI Manager:

    Manager > Custom Nodes Manager > search "ComfyUI_StringEssentials" > Install, then restart ComfyUI.

    Or the manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bradsec/ComfyUI_StringEssentials.git
    

    Then restart ComfyUI (or refresh nodes). Everything lands under Add Node > utils > StringEssentials.

    Gotchas

    • This node is not an output node - nothing renders on the canvas. If you want to actually see the text, wire it into String Preview from the same pack. That trip (Textbox → process → Preview) is the pack's intended workflow.
    • Because it passes through untouched, leading/trailing spaces and line breaks go with it. If that bites you, run it through String Strip with remove_extra_spaces on - or just trim it in the textbox.
    • It's genuinely redundant for the "type one prompt into one sampler" case. Don't install this pack for the textbox; install it for the processing nodes and keep the textbox as the convenient feed.

    Small, boring, and occasionally the exact thing that keeps a messy workflow readable.

    Categoryutils/StringEssentials

    Inputs (1)

    NameTypeDefaultDescription
    input_stringSTRINGEnter text here

    Outputs (1)

    NameTypeDescription
    output_stringSTRING