Nodes/ComfyUI-RMBG/Mask Overlay (RMBG) 🖼️🎭
ComfyUI Node Runs on cloud

Mask Overlay (RMBG) 🖼️🎭

Mask Overlay (RMBG)

By 1038lab·Created 2 years ago·Updated 8 days ago· 2,051
Mask Overlay (RMBG) 🖼️🎭
  • mask_color
  • image
  • mask
  • IMAGE
  • MASK
mask_opacity0.50

Mask Overlay is a debugging node, and a good one. It paints a mask on top of its image in a semi-transparent color so you can actually see what your mask is grabbing, laid over the picture it came from. When a background remover or a segment node hands you a mask and the result looks wrong, this is how you find out whether the mask itself is the problem - instead of squinting at a black-and-white mask in one preview and the image in another, trying to line them up in your head.

There's no model and nothing to download; it's pure visualization. It tints the masked region and composites it over the image at an opacity you set, so the overlay reads like a highlighter drawn over the parts the mask covers. That's genuinely the whole job, and it's the kind of small thing that saves real time once you're building masking workflows - you catch a mask that's biting into the subject or leaking into the background at a glance.

The inputs are few: mask_opacity (0–1, default 0.5) sets how see-through the overlay is - lower to still read the underlying image clearly, higher to make the mask region pop. mask_color (default blue, #0000FF) is the tint; pick something that contrasts with your image so the mask stands out - blue's fine on skin tones, but switch to magenta or green over a blue background. The image and mask inputs are both optional ports you wire from upstream. Outputs are IMAGE (the overlaid visualization) and MASK (the mask passed through unchanged, so you can keep it flowing to the next node). This is also flagged as an output node, so it renders its result directly in the graph - you don't strictly need a separate Preview node to see it.

Install comes with the pack: "Comfyui-RMBG" in ComfyUI Manager, or cd ComfyUI/custom_nodes && git clone https://github.com/1038lab/ComfyUI-RMBG, then pip install -r requirements.txt and restart. No weights.

Practical notes. Because it passes the mask straight through, you can leave it inline in a working graph - drop it between a segment node and your inpaint, and it shows you the mask on every run without breaking the pipeline. That's more useful than it sounds: you get a live view of what's being masked as you tweak thresholds and offsets upstream, no rewiring. The mask_color choice matters more than you'd think - the default blue vanishes over anything blue-ish, so if the overlay looks invisible, that's why; change the tint. And mask_opacity around 0.4–0.6 is the sweet spot where you can see both the mask and the image detail underneath; crank it to 1.0 only when you want the mask shape alone.

Where it fits: this is a workflow-tuning tool, not part of your final output. You use it while dialing in a mask - checking that a Segment prompt grabbed the right object, that a mask_offset didn't over-grow into the background, that a parser caught the whole garment - then either leave it inline for ongoing visibility or pull it once you're happy. Its tiny impression count but high click-through fits exactly: not many people search for it, but the ones who do know precisely the small, useful thing they want.

Category🧪AILab/🖼️IMAGE

Inputs (4)

NameTypeDefaultDescription
mask_opacityFLOAT0.500–1Control mask opacity (0.0-1.0)
mask_colorCOLORCODE#0000FFColor for the mask overlay
imageoptIMAGEInput image (RGBA will be converted to RGB)
maskoptMASKInput mask

Outputs (2)

NameTypeDescription
IMAGEIMAGE
MASKMASK