Nodes/Tojioo Passthrough/Mask Passthrough
ComfyUI Node

Mask Passthrough

Route the thing your inpainting and detailing live on

By Tojioo·Created 11 months ago·Updated 7 months ago· 13
Mask Passthrough
  • mask
  • mask

Masks are the quiet workhorses of the detailing and inpainting workflow: a detector produces one, and it feeds the detailer, the inpaint sampler, the composite, sometimes a preview. The Mask Passthrough is a single optional mask socket in and the same mask out - a clean relay so that one mask can travel and fan out without a loose wire dragging across the whole graph.

It's especially useful in the segment-then-detail pipeline that dominates modern face and object fixing: detector → mask → detailer, with the same mask often feeding a preview so you can sanity-check what the detector actually found. Thread it through a passthrough at a subgraph boundary and there's one clear place to inspect which mask is on that wire. You'll also want it if you're doing masked inpainting with an img2img pass - the mask is as important as the prompt, and it deserves a tidy lane.

How it works

Same as every simple passthrough in this pack: the run function is return (kwargs.get("mask"),). Input in, unchanged out. And the same two behaviors apply:

  • Unconnected means None. Empty socket, or a muted/bypassed node upstream, and the output is None. Fallback-friendly, but it's also the thing that makes a downstream inpaint node suddenly "forget" its region.
  • Connect-only. No widget. The mask has to come from a detector, an editor, or another node - which is exactly right for a value that should be produced once and shared, not re-created by hand in two places.

Inputs and outputs

  • mask (MASK) in → mask (MASK) out.

One pair. The output feeds any MASK socket - detailer regions, inpaint samplers, mask editors, previews. It lives under Tojioo Passthrough → Simple Passthrough.

Install

Manager → search "Tojioo Passthrough" → Install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Tojioo/tojioo_passthrough.git

No models, no pip deps. Small single-maintainer pack, GPL-3.0.

Common issues

The classic gotcha is the silent-mask: you mute the detector to test another branch, and the detailer downstream runs on no mask at all, re-rendering the whole frame instead of the region you wanted. There's no error - the passthrough dutifully reports None - so the failure looks like "the detailer stopped working." Check the source of the mask wire before the passthrough, and you'll spot it fast. Other than that, it's a hard node to break, which is the point.

CategoryTojioo Passthrough/Simple Passthrough

Inputs (1)

NameTypeDefaultDescription
maskoptMASK

Outputs (1)

NameTypeDescription
maskMASK