DOGMA InstanceAuditView v56.7
Building the evidence sheet your VLM needs to judge a mask
- image
- candidates
- instance_sheets
- audit_instructions
You can't just show a vision model a mask and ask if it's right. It has no idea what "right" means until you show it the photo, the mask, and the two of them together. This node builds that comparison - one candidate at a time - and writes the question to go with it.
Why per-instance, not category-wide
The v56.6 pass had a category-wide audit: union all the masks for "buildings", show one sheet, get one PASS/FAIL. That works when a category stands or falls together. It falls apart on a category with forty instances, where three of them are wrong - you either throw away thirty-seven good masks or you keep three bad ones.
v56.7 went per-instance. Each candidate gets its own crop, its own sheet and its own verdict, so a bad detection dies alone. The author's own review of the v56.6 pass puts it plainly: instance-level review needs more analysis than a single category-wide verdict. It's also slower, by exactly the factor you'd expect.
How it works
For each item in the candidate bundle, the node:
- finds the mask's bounding box, then pads it by 12% of the longer bbox side (minimum 16px), clamped to the image;
- crops the source image to that box and resizes so the longest side is
panel_size; - builds a 2×2 sheet - top left the original crop, top right the mask as white-on-black, bottom left a cyan overlay at 50%, bottom right the selected pixels on grey;
- emits the matching instruction.
The four panels are the point. White-on-black answers "what shape is this"; cyan overlay answers "where is it, relative to the photo"; selected-pixels-on-grey answers "what did I actually grab". A VLM judging a single binary mask without the source tends to hallucinate a subject and approve it.
The instruction is equally specific, and it tells you what the phase-3 design actually values: PASS when the selection mainly follows a visible instance or coherent part of the named category, with partial buildings, occluded objects, windows within a facade and disconnected visible parts all explicitly valid, and no requirement to cover every instance in the crop. FAIL for a substantial selection of a different semantic class, scattered patches on unrelated surfaces, or no visible target - and one blunt line to stop the model rejecting the thing it was asked about: never reject the target class itself as background. Answer format is PASS or FAIL followed by a short reason. No editing instructions.
An empty candidate list produces a single 64×64 black sentinel sheet and a Return FAIL. instruction, so list alignment survives to the review node.
Inputs and outputs
- image - the analysis image, the same one the masks came from.
- candidates -
DOGMA_CANDIDATES, fromDOGMASAMSearchV567. - panel_size - 256 to 768, default 512, step 64. The longest side of each panel. Bigger panels cost VLM time and VRAM; 512 is a reasonable place to sit, and you bump it if the VLM keeps getting small objects wrong.
Two list outputs: instance_sheets (IMAGE, one 2×2 sheet per candidate) and audit_instructions (STRING, one prompt per candidate), both flagged as list outputs. The instructions go to your VLM; the sheets are what you see in the previews when a verdict looks wrong. Pair the VLM's answers with DOGMAInstanceReviewV567.
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 ComfyUI and load a graph from the v56.7 era - the README's instruction for the current release is to update via Manager and run workflow V56.19. The pack itself downloads nothing; the vision model doing the judging is separate (DOGMA's reference graphs use Qwen3-VL) and the masks come from the SAM 3 nodes in ComfyUI core.
Gotchas
This multiplies your VLM calls. Global search on a street scene can return 30+ candidates, and every one of them now gets its own sheet and its own generation. If your Qwen pass is the slow part of the run, this node is why - check the search report for the candidate count before you blame the sampler.
Rejections are cheap; retries aren't automatic. A FAIL here doesn't make the pipeline look harder on its own. The recovery path is a second search in local_recovery mode, and it needs the review bundle from the first pass fed back in.
Panel size changes what the model can see, not what the mask is. Resizing happens with bilinear interpolation on all four panels, so a 30-pixel mask in a huge crop turns into a soft blob at panel_size 256. Bigger panels for small objects, smaller panels if your VLM is choking on detail.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| candidates | DOGMA_CANDIDATES | — | |
| panel_size | INT | 512256–768 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| instance_sheets | IMAGE | — |
| audit_instructions | STRING | — |