BMAB Masks To Images
See what your mask actually looks like
- masks
- images
The simplest node in this whole batch, and useful for exactly one reason: masks in ComfyUI are single-channel data you can't preview directly with Preview Image, and this converts one (or a batch) into a plain grayscale image you can. That's it. If you've ever wired up a detection or segmentation step and had no idea whether it actually found what you expected before it silently fed a garbage mask into an inpaint pass, this is the node that closes that visibility gap.
Why this matters more than it looks
Debugging a masked-fill pipeline blind is one of the more common ways people waste time on inpainting workflows generally - you change a threshold or a detection setting, the final image comes out wrong, and you can't tell whether the mask itself was bad or whether the fill step mishandled a good mask. Dropping this node in right after whatever produces your mask (a detector, a manual paint, a background-removal node's mask output) and piping it into Preview Image turns that guesswork into a two-second check.
The inputs and outputs that matter
masks(required, MASK) - accepts a mask batch, not just a single mask, so it works whether you're inspecting one region or several detections at once.- Output:
images(IMAGE) - a grayscale visualization where mask value maps to pixel brightness (white = fully selected, black = fully excluded, same convention ComfyUI masks always use).
No settings, no thresholds, nothing to configure.
How to install it
ComfyUI Manager: search comfyui_bmab. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/portu-sim/comfyui_bmab.git
cd comfyui_bmab
pip install -r requirements.txt
Pure conversion utility - no model, no dependency on BMAB's detection or ControlNet features.
Common issues & troubleshooting
The preview looks completely black or completely white. That's not a bug in this node - it's telling you the truth about your mask. An all-black output means nothing is selected (your detector found nothing, or your paint mask is empty); all-white means everything is selected, which is a real problem if you only meant to target one region. Fix the upstream node producing the mask, not this one.
You expected color and got grayscale. Masks are single-channel by definition, so there's no color information to reconstruct - grayscale is the honest representation, and it's also what makes edge quality and feathering easy to eyeball, which is the whole point of using this for debugging.
A batch of masks and only one preview shows up. Preview Image downstream of this will typically only display one image from a batch at a time in the UI depending on your ComfyUI version - check the node's batch controls or step through the batch index if you're inspecting multiple detections and only seeing the first.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| masks | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |