ScarlotSoft Image/Mask Preview
See your mask as a red overlay — the ScarlotSoft Image/Mask Preview node
- image
- mask
- IMAGE
A mask is just a grayscale tensor, and you can't tell by looking at a gray blob whether it covers the thing you actually want to inpaint. ScarlotSoft Image/Mask Preview exists to close that gap: it composites your mask over your image as a colored overlay - bright red by default - so you can see exactly what a detailer or inpainting pass is going to touch before you spend a render on it. And it's an output node, so it previews on the canvas and also passes an IMAGE through if you need it downstream.
The three required inputs are all display settings: mask_opacity (0–1, default 1) controls how strong the tint is - drop it to 0.5 if you want to see the subject through the color; mask_color defaults to 231, 22, 28, a red you can change to any RGB triple; and pass_through, which decides what the IMAGE output carries. The two data inputs - image and mask - are optional, and this is deliberate: plug in both for the classic overlay, plug in only a mask and it renders the mask over a black background (still readable, still useful), or only an image and it just shows the image tinted uniformly. If you connect neither, it returns a harmless 64×64 black frame instead of crashing.
Here's the pass_through logic, because it's the one thing people get wrong. With pass_through on and an image connected, the node's IMAGE output is the original, un-overlaid image - the preview stays on screen but the downstream flow gets the clean pixels. That's the sane mode when you want to preview a mask without altering what feeds your sampler. With pass_through off, the IMAGE output is the composited overlay itself, which you might genuinely want if you're building a "mask visualization" save. If only a mask is connected and pass_through is on, the mask gets expanded to a 3-channel image so the socket still carries something valid.
One honest limitation: this is a preview of masks, not a mask editor. If a mask is slightly off, this node shows you the problem; fixing it still means adjusting whatever generated the mask upstream (thresholds, expansion, the segmenter). And because it saves to temp and renders a composite, it does a small amount of work per run - fine for inspection, not something to leave in a 1000-image loop. In practice it's the node you drop after MaskFromColor or GroundedSAM to check your work before committing to a masked sampling pass.
Install with the pack - ComfyUI Manager → search ScarlotSoft → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/scarlotsoft/ComfyUI_ScarlotSoft
No dependencies. Suite theme; hard-refresh if it looks off after a UI-mode switch.
Is it worth it? If you do any masking work at all, a colored overlay beats squinting at white-on-black masks - and having it preview in place instead of opening a separate window is the difference that makes you actually use it. It's a small, honest utility node, and it does its one job well.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| mask_opacity | FLOAT | 1.000–1 | — |
| mask_color | STRING | 231, 22, 28 | — |
| pass_through | BOOLEAN | false | — |
| imageopt | IMAGE | — | |
| maskopt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |