Nodes/ComfyUI-YogurtNodes/Preview Mask Bridge (Output) (Yogurt Nodes)
ComfyUI Node

Preview Mask Bridge (Output) (Yogurt Nodes)

See your mask in the graph while the dims ride along

By yogurt7771·Created 2 years ago·Updated 9 days ago· 1
Preview Mask Bridge (Output) (Yogurt Nodes)
  • masks
  • masks
  • width
  • height
  • batch

Masks are invisible until you look at them. A mask node might be producing exactly what you want, or a black rectangle, and you won't know until the inpaint comes out wrong. Preview Mask Bridge (Output) (Yogurt Nodes) is the node that makes the mask visible in the ComfyUI UI while passing it - and its dimensions - straight through the graph.

It's part of the pack's "bridge" family: pass-through nodes that also give you something to look at. Feed it masks and you get the mask back out for the next node, plus width, height, and batch numbers, while a preview of the mask shows up in the interface. It's the tool for the middle of a mask pipeline - checking that an auto-generated mask actually covers the region before you commit to an inpaint, then passing the numbers along to nodes that need them.

How it works

The "bridge" design means it's a passthrough with side effects: it saves a preview of the input masks to ComfyUI's temp directory so the UI can display it, then returns the same masks along with the batch dimensions. The "(Output)" suffix marks the variant meant to be dropped into a workflow when you want the preview without treating the node as a terminal output - the family also includes the plain Preview Mask Bridge for terminal-style usage. Either way, the mask itself is untouched; this node never modifies pixels.

The inputs and outputs that matter

  • masks (input) - the MASK tensor to preview and pass through.

Outputs:

  • masks - the same mask, unchanged, ready for the next node.
  • width / height - the mask's dimensions as ints.
  • batch - how many masks are in the batch.

The width, height, and batch outputs are the quiet win: in a workflow that needs to know the mask's size for a crop or a resize, you can grab them here instead of adding another measurement node.

Installing it

It's part of ComfyUI-YogurtNodes. Install via ComfyUI Manager (search "ComfyUI-YogurtNodes") or:

cd ComfyUI/custom_nodes
git clone https://github.com/yogurt7771/ComfyUI-YogurtNodes.git
cd ComfyUI-YogurtNodes
pip install -r requirements.txt

Restart ComfyUI; it's under "Yogurt Nodes". Nothing to download.

Where people get burned

Two small confusions worth clearing up. First, the "(Output)" in the name doesn't mean it's a terminal save node - it still passes data through, and the preview is what shows in the UI. Second, the preview is saved to the temp directory, so it won't appear in your normal output folder; that's expected behavior for a preview node, not a misconfiguration. If the preview looks wrong, check what's feeding masks rather than this node - all it does is show you the truth. For the money it's a two-second sanity check that saves you from a full inpaint run on a garbage mask.

CategoryYogurtNodes/IO

Inputs (1)

NameTypeDefaultDescription
masksMASK

Outputs (4)

NameTypeDescription
masksMASK
widthINT
heightINT
batchINT