ComfyUI Node

Mask Passthrough

A labeled wire for your mask — Mask Passthrough

By wenchengxiang·Created about a month ago·Updated a day ago· 1
Mask Passthrough
  • mask
  • mask

Take a mask in, hand the same mask out. That's the entire job of wcx_MaskPassthrough - no resizing, no thresholding, no cleverness. It's the mask member of this pack's passthrough family, and like its siblings it exists to make your graph legible, not to transform anything.

Why bother? Because in a real workflow a mask rarely feeds just one thing. The mask from your detector wants to reach the inpaint sampler, a preview node, maybe a mask-combine step and a batch joiner. Four wires off one socket and the graph starts looking like a plate of noodles. Route the mask through a single labeled Mask Passthrough and every branch has a clean, obvious origin. That's the "one source, many consumers" pattern from the KB's node-plumbing doc - a reroute, purpose-built for the mask type.

Input is one optional mask socket (declared forceInput, so it accepts wired values) and output is mask. Leave the input unwired and you get None out - which is exactly the signal an optional downstream input expects when a branch should be skipped. That makes it a serviceable mute point too: unplug the input and downstream optional mask inputs quietly do nothing.

Three honest notes:

  • It stores nothing and checks nothing. A mask that's mismatched in size or shape passes through exactly as broken as it was. If you want a node that fixes masks, that's the rest of this pack (blur, grow, fill holes) - this one is pure plumbing.
  • It won't fix performance. A passthrough is a graph-level shuffle, not a data copy. No VRAM cost, no speed gain. Its value is entirely organizational.
  • ComfyUI lets you drag wires anywhere already. The node's contribution is a named anchor in a big graph, not a capability you lack. Reach for it when a workflow starts feeling unreadable, not because you must.

Standard light install:

# ComfyUI Manager: search "ComfyUI-Practical-Tools" → Install → restart

# or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/wenchengxiang/ComfyUI-Practical-Tools
# restart ComfyUI

It's the most humble node in the pack and I won't pretend otherwise. But when you're staring at a fifty-node mask pipeline and trying to remember which wire feeds what, a couple of well-placed passthroughs are worth more than a fancier mask op.

CategoryPractical-Tools/Passthrough

Inputs (1)

NameTypeDefaultDescription
maskoptMASK

Outputs (1)

NameTypeDescription
maskMASK