DOGMA v40 Mask Visual
The mask sanity check that shows you the image underneath
- image
- masks
- overlay
- mask_image
- info
A white blob on black tells you where a mask is. It doesn't tell you what it landed on, and that's the question that actually matters when a segmentation model was handed a phrase. DOGMAMaskVisualV40 keeps the picture in the frame: you give it an IMAGE and a MASK, it gives you the image back with the selection lit up, plus a clean black-and-white version of the mask on its own.
What the two outputs are
overlay - the source image knocked down to roughly 22% brightness, with the selected region returned at full brightness. So the selection reads as the "correctly exposed" part of a darkened photo rather than as a colour wash over the top. That's a small decision with a real payoff: you're judging edges and coverage, and a glow-coloured overlay actively hides the edge quality you're trying to assess.
mask_image - the union of the mask batch as a straight black-and-white image, expanded to three channels. That's the one to feed a vision model or eyeball for shape.
info - mask count and union coverage percentage, e.g. SAM masks=6 | union coverage=3.412% | bright area = selected.
The threshold is 0.35, and that's worth knowing
The overlay only lights pixels above 0.35, and the coverage number is computed on that same hard threshold. So this node is showing you the confident part of your mask. Anything the masker was unsure about - values between 0 and 0.35 - disappears into the darkened background and doesn't count toward the percentage.
That's fine for a sanity check and slightly misleading for a strength check. A soft SAM edge will look tighter here than it behaves in the sampler, and a mask whose values never climb past 0.3 will describe itself as 0% coverage while still feeding a weak signal downstream. If you're chasing a local pass that does nothing, compare this coverage number against the one DOGMAMaskedLatentV40 reports after its own feathering - if the first says 3% and the second says 30%, your mask is wide and weak rather than tight and strong.
The image, if dimensions disagree with the mask, gets resized to the image; a mask batch of one is broadcast to cover multiple image frames. Empty masks are handled: you get a black panel and a count of zero rather than an error, which matters because "the masker found nothing" is a legitimate result to render.
Inputs and outputs
image, masks in; overlay, mask_image, info out. No parameters - not even a colour picker.
Install
ComfyUI Manager → search DOGMA Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
Restart, and it's under DOGMA/v40. No pip installs, no weights to fetch - pure tensor work with PyTorch.
Where it bites
The 0.22/0.78 brightness split is fixed, and the darkening can hide detail you care about in the unselected area - on a very dark source image, the background goes near-black and the overlay reads as a mask on a void. It's a visualisation, not a grade; if you need to see the surroundings, look at mask_image next to the original rather than at the overlay.
And it collapses the batch, like the rest of this family of visualisers: mask_image is a union, not one frame per instance. For per-instance inspection you're looking at the wrong node - and honestly, at that point you want the mask audit sheet, which is purpose-built for showing five selections against one image in a format a vision model can read.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| masks | MASK | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| overlay | IMAGE | — |
| mask_image | IMAGE | — |
| info | STRING | — |