Nodes/ComfyUI-Apt_Preset/create_Mask_visual_tag
ComfyUI Node

create_Mask_visual_tag

Sanity-check a mask before it wrecks your generation

By cardenluo·Created 2 years ago·Updated 18 days ago· 309
create_Mask_visual_tag
  • base_image
  • mask
  • mask_info
  • image
  • mask
  • fill_mask
ignore_threshold0
opacity1.00
outline_thickness3
filltrue
mask_mode原始
smoothness0
out_colorcolorful
image_outputPreview

Masks are invisible until they're wrong. You wire a segmentation node into your inpaint chain, hit run, and the result is subtly off - and you have no idea if the mask itself was garbage or if the sampler just did something weird with it. create_Mask_visual_tag exists for exactly that moment: it draws your mask back onto the image as a visible, colored overlay so you can actually look at it before you spend GPU time downstream.

Heads up before you build around it: this node lives in the pack's own Deprecated category. It still runs, but the author has stopped actively developing it - treat it as a debugging tool you reach for occasionally, not something to anchor a production workflow on.

How it works

Feed it a base_image and a mask, and it stamps a visual tag onto every region the mask covers. You're not stuck with the mask's raw, often-noisy outline either - mask_mode lets you swap that shape for a clean geometric stand-in (square, circle, five-pointed star, diamond, or hexagon, alongside the original shape) so you can see positions clearly instead of squinting at jagged edges. out_color picks the palette: colorful auto-assigns a different color per blob (the most useful mode when you've got multiple disconnected mask regions and want to tell them apart at a glance), or you can pin it to a single color, including a neutral gray.

The inputs and outputs that matter

  • base_image / mask - the pair you're inspecting. Standard IMAGE and MASK types.
  • ignore_threshold (0–10000) - skips mask blobs smaller than this size, so stray single-pixel noise from an imperfect segmentation doesn't clutter the visualization with tags you don't care about.
  • fill (bool, default on) and outline_thickness - solid-fill the tagged region or just outline it, and how thick that outline is.
  • opacity and smoothness - overlay strength and how much the tag shape's edges get smoothed.
  • image_output (Hide / Preview / Save / Hide/Save) - the same output-mode pattern you'll recognize from Impact Pack's detailer nodes if you've used those.

It gives back three things: image (the tagged visualization, what you actually look at), mask (the mask carried through), and fill_mask (a solid-filled version - handy if your source mask came in as outlines rather than filled regions and you need a filled one downstream).

How to install it

It ships inside the whole pack, no separate install. Easiest path is ComfyUI Manager → search "ComfyUI-Apt_Preset" → Install → restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git

On Windows, double-click install.bat in the cloned folder to pull in dependencies (it needs to run through your ComfyUI's own Python - the portable build's python_embeded, not a system Python - or it'll install into the wrong environment and the node will still fail to load). On Linux/Mac, activate your ComfyUI venv and pip install whatever the pack's requirements file lists from inside that folder. Restart ComfyUI either way.

Common issues & troubleshooting

Node doesn't show up after cloning. Classic missing-dependency situation - this is the single most common complaint across the entire ComfyUI custom-node ecosystem, not specific to this pack. Check the console log on startup for an import error, then rerun install.bat (or the manual pip install) rather than assuming the clone itself failed.

Everything is tagged, or nothing is. Start with ignore_threshold at 0 to see literally everything the mask contains, then raise it once you've confirmed the mask isn't empty - an all-black or all-white mask upstream is a far more common bug than anything in this node.

It's marked deprecated - should you still use it? For a one-off "let me see what this mask actually looks like" check, yes, it's fine and it works. Just don't build a repeatable production pipeline around a node the author has flagged as legacy; if the pack ships a newer mask-visualization tool later, that's the one to migrate to.

CategoryApt_Preset/🚫Deprecated/🚫

Inputs (11)

NameTypeDefaultDescription
base_imageIMAGE
maskMASK
ignore_thresholdINT00–10000
opacityFLOAT1.000–1
outline_thicknessINT31–50
fillBOOLEANtrue
mask_modeCOMBO原始6 options: 原始, 方形, 圆形, 五角星, 菱形, 六边形
smoothnessINT00–150
out_colorCOMBOcolorful7 options: colorful, white, black, red, green, blue, +1
image_outputCOMBOPreview4 options: Hide, Preview, Save, Hide/Save
mask_infooptMASK_INFO

Outputs (3)

NameTypeDescription
imageIMAGE
maskMASK
fill_maskMASK