Nodes/DOGMA Nodes/DOGMA Semantic Overview v16
ComfyUI Node

DOGMA Semantic Overview v16

Look at your masks before you spend an hour sampling

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA Semantic Overview v16
  • sign_mask
  • mask_1
  • mask_2
  • mask_3
  • mask_4
  • mask_5
  • repair_union_image
  • sign_image
  • info
category_1
category_2
category_3
category_4
category_5

What it is

A visualisation node, and one of the few in this pack you'd call merciful. DOGMASemanticOverviewV16 takes five masks plus the categories they belong to, plus a sign mask, and renders two preview images: the union of everything that will be repaired, and the part that will be deliberately left alone.

Every detailer workflow has the same silent failure. The detector fires on something it shouldn't, or misses the thing you actually cared about, and you don't find out until you've run the full pipeline and are staring at a window that got lovingly re-rendered into a completely different window. Feeding the masks into this node first turns that into a two-second check.

How it works

Each incoming mask is normalized: flattened to a single channel (a multi-channel mask is max-combined), bilinearly resized to the largest canvas among all inputs, and clamped to 0–1. That resize matters - masks from different detectors in the same graph don't always agree on resolution, and this node quietly reconciles them instead of erroring.

Then it classifies. Categories are run through the pack's family mapper, and any category that maps to none - empty strings, __none__, unused - is excluded from the repair union. Categories that map to a real family get included. So vehicles counts, __none__ doesn't, and neither does a slot you left unwired but typed n/a into.

The union is the max across all active masks, then multiplied by 1 - sign_mask. That's a hard subtraction: anything inside the sign mask is removed from the repair region regardless of what else covers it. This is the same text-safe instinct that runs through the whole pack - signage is preserved, so signage is not a repair target, even where a neighbouring category's mask overlaps it.

Both outputs are rendered as 3-channel images so they display in ComfyUI's image previews: a white-on-black silhouette for the union and another for the sign mask.

Inputs and outputs

Everything is required: sign_mask, then five pairs of mask_1mask_5 and category_1category_5. The categories are forceInput strings - wire them from a planner node rather than typing. Any unused slot still needs a mask wired in unless you're happy with an all-zero one.

Outputs:

  • repair_union_image - what will be re-rendered, as an image. Preview it.
  • sign_image - what's being protected. Preview it too, especially on a street scene; it's the fastest way to confirm your text protection is where you think it is.
  • info - a string listing the pixel-percentage coverage per category and for the sign mask, e.g. vehicles: 3.4% | people: 1.1% | ... | sign: 0.6%.

That percentage list is more useful than it looks. A category showing 0.0% means the detector fired on nothing, which is your cue to check whether the planner threw the category away or the threshold is too high. A category showing 40% means you're about to re-generate 40% of the frame, which is a different problem.

Where it sits in the graph

The v16 generation of this pack runs: plan the categories → detect masks → overview (this node) → macro crops → local edits → stitch. In practice you keep it wired permanently and just glance at the two previews, because the cost of re-running a graph after a bad mask is minutes and the cost of looking is nothing.

Install

ComfyUI Manager → DOGMA Nodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
# restart ComfyUI

No dependencies beyond what ComfyUI already ships - requirements.txt is a comment, and the code is plain PyTorch. No models, no keys, nothing to download.

Gotchas

  • Mismatched mask resolutions are resized to the largest one, silently. If a mask looks smeared in the preview, check whether it was upscaled from something much smaller.
  • The sign subtraction is > 0.5 on the sign mask, so a fuzzy sign mask behaves like a hard-edged one here.
  • Category names must reach the family mapper to count. backdrop and scenery mean nothing to it; building, wall and interior do.
  • Zero community documentation exists for this half of the pack - no reddit threads name it, and the README covers the WAN VACE prep nodes and DOGMA samplers instead.
CategoryDOGMA/Semantic Detailer

Inputs (11)

NameTypeDefaultDescription
sign_maskMASK
mask_1MASK
category_1STRING
mask_2MASK
category_2STRING
mask_3MASK
category_3STRING
mask_4MASK
category_4STRING
mask_5MASK
category_5STRING

Outputs (3)

NameTypeDescription
repair_union_imageIMAGE
sign_imageIMAGE
infoSTRING