Bridge Input (MASK)
The named mask socket for inpainting and detailer workflows
- value
- value
Inpainting is where the interesting ComfyUI workflows live, and inpainting is all about masks - the grayscale shape that tells the sampler what to touch and what to leave alone. Bridge Input (MASK) is ComfyBridgeIO's named tap on that mask stream: a marked spot in the graph where an agent or external script knows the mask enters, so a whole inpaint pipeline can be driven from outside.
Like the other complex-type bridges in this pack, it has no widget. The input and output are both MASK sockets: wire a mask-producing node (Load Image + a mask converter, a segmentation node, a VAE Encode for Inpaint's mask) into the optional value input, then feed the value output to whatever consumes the mask. The Python client doesn't try to fabricate a mask tensor - MASK values in the API-format JSON are node links, so the mask path is built inside ComfyUI and the bridge just marks where it sits. That matters because the client's run() patch step targets scalar values and name tags; the mask stream is the part that flows, not the part that gets injected.
The name widget (STRING, default "input_name") is still the contract - extract_schema() on the client surfaces this as an input named whatever you typed, so the agent knows the workflow takes a mask here. It's how a tool like bridge.get_schema("workflow.json") tells an agent "this inpaint workflow expects a mask at this point."
Install
cd ComfyUI/custom_nodes
git clone https://github.com/cbpark84/ComfyBridgeIO
Restart ComfyUI, or use ComfyUI Manager → search ComfyBridgeIO → Install. No model downloads, no heavy dependencies. The optional Python client (pip install -e in the repo) needs aiohttp, websockets, Pillow. Watch out for the README's stale clone URL (nicekate/ComfyBridgeIO) - use cbpark84 as above.
Common issues
Same trap as the IMAGE bridge: an unwired MASK input outputs nothing, and downstream inpaint nodes fail or no-op. Wire the mask source inside ComfyUI first, then point your agent at the named bridge. And remember masks are single-channel grayscale tensors - if you're feeding this from something that outputs a multi-channel image, convert it to a proper MASK upstream or the type mismatch shows up at the socket.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| name | STRING | input_name | — |
| valueopt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | MASK | — |