Nodes/comfybridgeio/Bridge Input (STRING)
ComfyUI Node

Bridge Input (STRING)

The text socket your AI agent actually fills in

By cbpark84·Created 2 months ago·Updated 2 months ago· 0
Bridge Input (STRING)
    • value
    nameinput_name
    value
    value_link

    Every "let an AI agent drive ComfyUI" workflow starts the same way: the agent needs to hand the graph some text. A prompt, a negative prompt, a filename, a caption. That's exactly what Bridge Input (STRING) is - a named hole in your workflow where an outside script or agent drops a string, without you touching the JSON by hand.

    ComfyBridgeIO (author: cbpark84) works by a simple contract. You drop Bridge Input nodes where external values should land, tag each with a name, save the workflow as API format JSON, then call the bundled Python client - bridge.run("workflow.json", inputs={"prompt": "a cat in space"}). The client deep-copies the workflow, patches each Bridge Input's value, POSTs it to ComfyUI's /prompt API, waits on the websocket, and collects results. Your original workflow file never changes. This STRING variant is the one you'll reach for most, because prompts are the thing you want to swap every single run.

    The inputs and output that matter

    Only two widgets actually matter, and one of them is the whole point:

    • name (STRING, default "input_name") - the identifier. Your client's inputs dict key must match this exactly. Call it prompt in the widget, pass {"prompt": ...} from Python, and they line up. Mismatch, and the client raises ValueError: BridgeInput 'x' not found in workflow.
    • value (STRING, multiline, default "") - the fallback text baked into the workflow. It's what runs if nobody injects anything. For a text-to-image template you'd put a sane default prompt here so the graph still works when you just hit Queue.
    • value_link (optional STRING socket) - wire another text-producing node in here and it wins over the widget at runtime. Worth knowing: if you connect this, an agent-injected value to this bridge gets shadowed. Keep it unwired unless you mean it.

    The single output, named value (type STRING), feeds your CLIP Text Encode (or any text consumer). Wire it to the positive prompt encoder and that's the whole setup: agent changes the prompt, workflow re-runs, new image comes out the Bridge Output.

    Install

    ComfyUI Manager → search ComfyBridgeIO → Install, then restart. Or the manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/cbpark84/ComfyBridgeIO
    

    Then restart ComfyUI. No model files, no heavy deps - the nodes run on stock ComfyUI. If you want the Python client too, pip install -e inside the repo (it needs aiohttp, websockets, Pillow). One footgun: the repo's own README shows a clone URL pointing at nicekate/ComfyBridgeIO - that owner line is stale, use cbpark84 as above.

    Common issues

    The typical beginner burn here isn't the node, it's the contract. If the client says the input wasn't found, the name widget doesn't match your dict key - check spelling, they're case-sensitive. And remember the injected value only takes effect when the workflow is run through the client; hitting Queue in the UI uses the widget value. That's not a bug, it's the design.

    CategoryComfyBridgeIO

    Inputs (3)

    NameTypeDefaultDescription
    nameSTRINGinput_name
    valueSTRING
    value_linkoptSTRING

    Outputs (1)

    NameTypeDescription
    valueSTRING