view_mask
Actually see your mask before you waste a generation
- mask
- images
view_mask is the "show mask" node: it converts a MASK into a viewable IMAGE so you can actually see what you're about to feed into an inpaint or conditioning stage. If you've ever stared at an inpainting result and asked "why did it regenerate my entire background," the answer was usually a mask that didn't look like you thought it did - and you couldn't tell because ComfyUI doesn't show raw masks as images.
That's the gap this node fills. ComfyUI's preview and save nodes expect IMAGE, not MASK. A mask is a floating-point tensor in the 0–1 range, and until it's rendered as an image it's invisible to your eyes and to most display nodes. The core workflow habit that separates people who inpaint cleanly from people who fight their own results is checking the mask before running the sampler. This node is that check, done in one step.
How it works
The required mask input accepts a MASK, normalizes the values into a visible grayscale range, and renders it as an IMAGE - bright where the mask is active, dark where it isn't. The images output lets you keep it flowing, so you can route the rendered mask to a preview, a save node, or even a compositing step. Because the output is a real image, everything downstream that wants pixels can now have them.
The inputs and outputs that matter
mask(MASK) - the required input. Wire in the mask you want to inspect.images(IMAGE) - the mask rendered as a viewable image.
One in, one out. Nothing to configure, which is exactly what a debug node should be.
How to install it
It ships with ComfyUI-Apt_Preset. Install the pack via ComfyUI Manager (search "ComfyUI-Apt_Preset") or:
cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset
then run install.bat (Windows) or pip install -r requirements.txt, and restart ComfyUI. No model downloads for this node.
Common issues & troubleshooting
If the rendered mask looks inverted or faint, check the mask's value range before blaming the node - masks arriving as float tensors outside 0–1, or as 0–255 ints, render differently until normalized. And if you see a mostly-black output, your mask is probably mostly-empty: that's the finding, not a bug. Pair this with view_Mask_And_Img when you want to see the mask overlaid on the image rather than standalone - standalone grayscale tells you where, the overlay tells you where relative to the subject, which is the more useful question for inpainting.
Pack-level caveat as always: niche pack, Bilibili-based author, translated README. If the node won't load, the pack's dependencies weren't installed - the recurring community report is IMPORT FAILED, fixed by running install.bat and restarting ComfyUI.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |