Nodes/DOGMA Nodes/DOGMA MaskAuditView v56.6
ComfyUI Node

DOGMA MaskAuditView v56.6

The 2x2 sheet that decides whether your mask survives

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA MaskAuditView v56.6
  • image
  • masks
  • audit_sheet
  • audit_instruction
category
panel_size640

A segmentation mask can be geometrically fine and semantically wrong. It's tight, it's clean, it just grabbed the wrong thing - or grabbed the right thing plus a strip of sky. No amount of pixel counting catches that; you need something that understands the image. So this node builds an argument in four panels and hands it to a vision model.

What it puts on the sheet

Category-wide, not per instance: the union of every mask for that category. Bottom-left to top-right, the four panels are

  1. the original photo,
  2. the exact selection, white on black,
  3. a cyan overlay at 65% over the photo,
  4. the selected pixels on a 25% grey field.

That's a genuinely well-chosen set. Panel two answers "what shape is this", panel three answers "where does it sit on the subject", panel four answers "what did it actually keep" - and panel four is the one that exposes the failure this audit exists for: a mask whose selected pixels are scattered detections on unrelated surfaces looks nothing like a coherent object once everything else is greyed out.

The mask is resized to the image with nearest-neighbour and thresholded at 0.5, so a mask that came from a different resolution still lands correctly.

The instruction it emits

The author writes the audit prompt to fail loudly and cheaply. It tells the model to check all selected regions including small disconnected patches, to FAIL if the selection contains substantial unrelated sky, buildings, ground or objects, or scattered islands on unrelated surfaces - with the very specific example that for vehicles, road and buildings are not vehicles - and to FAIL if the category is absent or the model can't judge semantic correctness. It explicitly permits missing instances and small edge errors, and it ends by demanding one word: PASS or FAIL.

That last requirement is not a stylistic preference. DOGMAMaskAuditGateV566 compares the answer to the literal string PASS, so a chatty answer fails the category regardless of what it meant. This node and that gate are a matched pair.

Inputs and outputs

  • image - the analysis image, first frame, first three channels.
  • masks - all masks for one category. Empty is fine for the sheet's sake, but an empty union is an automatic FAIL per the instruction.
  • category - the string, injected into the prompt so the model knows what it's judging. forceInput, so it's a wire.
  • panel_size - 256 to 1024, default 640, step 64. Each panel's longest side.

Two outputs: audit_sheet (a single IMAGE - 2×2 grid) and audit_instruction (the STRING to send to your VLM). Sheet and instruction go to the same vision node; the sheet is also the thing you look at yourself when a verdict seems unjust.

Note the interpolation: the sheet is built by stitching the four panels and scaling with bilinear sampling, so at large panel sizes on a small source you're feeding the VLM an upscaled sheet. 640 is a sane default - big enough for an object to be legible, small enough that every VLM in circulation handles it.

Install

comfy node install comfyui-dogma-nodes
# or
cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
pip install -r ComfyUI-DOGMA-Nodes/requirements.txt

Restart, and use a v56.6-or-later graph. The pack downloads no models; the vision model and the SAM 3 nodes are separate installs you supply. Nothing here needs a GPU beyond whatever your VLM already uses - the sheet assembly is CPU tensor work.

Gotchas

One sheet judges the whole category. If the union mixes two confusable things - a bus and the road under it - the audit fails the lot, and you lose the good masks with the bad. That's the trade the v56.6 pass makes, and precisely why v56.7 moved to per-instance sheets.

A failed audit tells you nothing about the fix. The verdict is one word plus your own eyes on the sheet. If the selection is islands on a surface, the detector's threshold is too low; if it's one object plus its shadow, the mask needs box ownership clipping (DOGMASAMInstanceGuardV566) before it's audited. The sheet shows the symptom, not the cause, and the geometry_report string alongside it is where you find the number that explains it.

Watch the report for the raw verdict. When the gate skips a category, its report quotes your VLM's answer truncated to 100 characters. That's where you find out your model wrote PASS. or prefixed its reasoning.

CategoryDOGMA/v56.6

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
masksMASK
categorySTRING
panel_sizeINT640256–1024

Outputs (2)

NameTypeDescription
audit_sheetIMAGE
audit_instructionSTRING