Nodes/CRT-Nodes/Mask Pass or Placeholder (CRT)
ComfyUI Node

Mask Pass or Placeholder (CRT)

Mask Pass or Placeholder (CRT)

By PGCRT·Created 2 years ago·Updated a day ago· 132
Mask Pass or Placeholder (CRT)
  • mask
  • mask_output

Mask Pass or Placeholder (CRT) is a one-liner that saves real workflows: if a MASK is connected, it passes it through untouched. If nothing is connected, it outputs a tiny all-white placeholder mask instead of erroring. That's it - and that behavior is exactly why it earns a place in template and batch graphs.

The problem it solves is ComfyUI's strictness about optional inputs. Plenty of nodes - detailers, inpainters, regional samplers - take a mask that you'd like to be optional. Leave the port unconnected in some runs and the node may refuse to execute, or worse, a workflow built for one case silently behaves differently in another. When you're sharing a workflow or running the same graph over a folder of varied inputs, you want the mask branch to be "either a real mask or a benign default," not a hard failure.

That's the design here. With a mask connected you get the exact same tensor back - no resizing, no re-encoding, byte-for-byte pass-through. Without one, it returns a (1, 2, 2) all-ones tensor - a tiny all-white mask. In mask terms white means "everything selected," so downstream nodes that treat the mask as "what to affect" simply affect the whole image. That's a sane default for a detail or inpaint pass: no mask → do everything. It keeps the graph running and produces a result you can see, rather than a stack trace.

There's a single optional mask input and one mask_output output. It has no required inputs at all, which is the tell that it's built for defensive wiring - you can even place it with nothing connected and it still resolves. Wire mask_output into whatever needs a guaranteed mask: ConditioningSetMask, a VAE encode with mask, an impact-style detailer, or CRT's own Mask Temporal Enhancer when you're processing video masks frame by frame.

The honest caveat is that "all-white" is only the right default for some consumers. If the downstream node interprets black as "keep" and white as "replace," an unconnected placeholder means full replacement - usually what you want, but not always. Read the node you're feeding before you trust the fallback.

Install with the pack: ComfyUI Manager → search "CRT-Nodes", or git clone https://github.com/plugcrypt/CRT-Nodes.git into custom_nodes and restart. It's pure tensor logic - no models, no extra deps, no download. It's the sort of node you don't notice until you remove it from a shared workflow and the graph starts breaking on people with different input folders.

CategoryCRT/Utils/Logic & Values

Inputs (1)

NameTypeDefaultDescription
maskoptMASK

Outputs (1)

NameTypeDescription
mask_outputMASK