Nodes/ComfyUI_EmAySee_CustomNodes/EmAySee Mask Overlay
ComfyUI Node

EmAySee Mask Overlay

See what your mask actually covers before you send it to a sampler

By EmAySee·Created about a year ago·Updated 4 months ago· 2
EmAySee Mask Overlay
  • image
  • mask
  • IMAGE
opacity0.50

EmAySee Mask Overlay is a visualization node, and honestly the pack is worth having just for these. It takes an image, a mask, and an opacity, and draws the mask back onto the image as a red tint. What comes out is an IMAGE you can look at - or feed to a preview/save node - to check exactly what your mask covers before you commit it to an inpaint pass, a ControlNet, or a detailer.

You'd think you wouldn't need that. You'd be wrong. Every time an inpaint comes back with a weird seam or a half-edited object, the first thing you do is stare at the mask and wonder "did that even cover the thing I wanted?" This node answers it in ten seconds. It's the cheapest debugging step in masked workflows, and it pairs naturally with everything else in this pack's masking set - mask it, overlay it, look at it, then feed the result onward.

How it works

The mechanism is a simple alpha blend. The mask is multiplied by the opacity value to become an alpha channel, and the image is blended toward pure red in exactly the masked region. Masked pixels turn red; everything else stays untouched.

The code handles the fiddly bits for you. If the mask is a different resolution than the image, it's resized with bilinear interpolation to match. If one is a batch and the other isn't, the single item is repeated to cover the batch. It even handles RGBA images - the red tint is applied to the RGB channels and your alpha channel comes through intact, which matters if you're overlaying onto something that feeds an editor later.

The inputs that matter

Only three inputs, and only one you'll actually touch:

  • image - anything with an IMAGE type.
  • mask - the MASK you're inspecting.
  • opacity - a float from 0 to 1, default 0.5. This is the one to play with. At 0.3 the tint is faint and you can judge where the mask sits against the underlying detail; at 1.0 it's a solid red flood so you can judge its shape. For checking whether your mask hugs the subject, start around 0.4.

The single output is an IMAGE. Wire it into a preview node (or the author's own preview passthrough nodes) to see it, or into anything downstream that needs the visualization. It's an output you look at, not a step in a pipeline - though there's nothing stopping you from routing it into an image-to-image pass if red-tinted input is somehow what you want.

Installing it

This node ships in the EmAySee pack, a solo author's collection of 60+ nodes. Easiest path:

# via ComfyUI Manager: search "ComfyUI_EmAySee_CustomNodes", install, restart
# or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/EmAySee/ComfyUI_EmAySee_CustomNodes

Then restart ComfyUI. There's no requirements.txt in the pack - MaskOverlay only needs torch and ComfyUI itself, so nothing extra installs. Expect a loud ASCII-art banner in your console on startup; that's normal.

Common issues

There aren't many failure modes, which is the point of a simple node. If the overlay looks wrong, the usual suspects are: the mask is inverted (white where you expected black - you'll see it instantly, that's the benefit), or the mask came from a node that outputs a different value range than 0–1, which makes the tint look washed out or absent. One quirk: if you pass a fully black mask you get nothing, and if you pass an all-white mask at full opacity you get a solid red rectangle - both are correct, and both are the sort of thing you want to catch here rather than in the sampler output.

The pack's README is AI-generated fluff and the author says the code ships without guarantees, so if you hit a genuine bug you're on your own - but for a node this small, that's a fair trade.

CategoryEmAySee/Image

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
maskMASK
opacityFLOAT0.500–1

Outputs (1)

NameTypeDescription
IMAGEIMAGE