Nodes/DOGMA Nodes/DOGMA AuditBatch v1.0.10
ComfyUI Node

DOGMA AuditBatch v1.0.10

Put four candidate masks in front of your VLM at once

By axior·Created 6 months ago·Updated 16 days ago· 2
DOGMA AuditBatch v1.0.10
  • image
  • candidates
  • instance_sheets
  • audit_instructions
◄panel_size384►

The problem it solves

Text-prompted segmentation gives you masks that look plausible and are sometimes wrong. Ask SAM 3 for "person" and you can get a mask that grabs a window frame, or a sky sliver, because the detector is open-vocabulary and has no idea what your scene is supposed to contain. The usual answer in ComfyUI is a second model: show the mask to a vision-language model and ask "is this really the thing?". That's the audit step in the detect → mask → audit → detail loop that Impact Pack made normal.

Doing it one mask at a time is slow and chatty. DOGMAAuditBatchV110 packs four numbered candidates into one sheet, writes the prompt for you, and hands you both as lists.

How the sheet is built

It calls the pack's per-instance view builder to crop around each candidate mask (with a 12% margin), then lays out a 2×2 per candidate: original crop, white mask, cyan overlay, and selected pixels on gray. Four of those are packed into one 2×2 grid at roughly 1024px square, each with a dark banner reading 1: <category> so your VLM has an index to answer against.

The instruction text it emits along with the image is specific about how to judge: PASS useful selections belonging to the category, including partial objects, holes, occlusions and imperfect boundaries; FAIL only for clearly substantial selection of unrelated objects/background or an absent target. It also tells the model not to fail for incomplete coverage. That's deliberate - mask recall is the search node's job, precision is this one's.

Inputs and outputs

  • image - the source image the candidates came from.
  • candidates - a DOGMA_CANDIDATES bundle, i.e. the output of a DOGMA SAM search node.
  • panel_size - 256–768, step 64, default 384. Read that default carefully: v1.0.10 clamps it with min(panel_size, 384), so feeding 768 here does not get you bigger panels. If you want the larger panels, that's what v1.0.11 and v1.0.14 are for.

Outputs are both lists:

  • instance_sheets (IMAGE, list) - one grid per group of four candidates.
  • audit_instructions (STRING, list) - one instruction string per grid, in the same order.

Wire both as a list pair into a VLM node (any VLM/LLM node that takes an image list and a text list - the pack's own workflows use ModernVLM from comfyui_vlm_nodes), then feed its text list into DOGMAReviewBatchV110.

If there are zero candidates you don't get an error, you get a placeholder: a 1×64×64 black image and the string No candidates. Downstream review handles that.

Wiring gotchas

The batch size is fixed at four and the review node knows it. DOGMAReviewBatchV110 requires exactly ceil(n/4) answers and raises DOGMA: audit batch count mismatch. if the count is off. If you're in the habit of filtering strings between the VLM and the reviewer - or you're using a VLM node that drops empty lines - that check is what catches you.

v1.0.10's reviewer defaults to report_only. Votes are logged as PASS/FAIL/REVIEW, malformed answers are marked REVIEW and kept, and nothing is deleted from your mask set. That's the right first run: look at audit_report, see how often your VLM disagrees with your masks, and only then switch to reject_explicit_fail (the default in the 1.0.11+ reviewers). Report-only can retain genuinely wrong masks - it is a report, not a guarantee.

Judge the pixels, not the scene. The prompts hammer this, but it's also the thing users get wrong when they edit the instructions: a mask that selects a real building inside a "people" crop is a failure of that mask, not a failure of the crop.

Install

Manager → search DOGMA Nodes, or:

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

scipy>=1.10 is the only Python dep declared in requirements.txt; nothing is downloaded to models/, and the pack never patches ComfyUI core. What you will need comes from the workflow around it: SAM 3 weights and ComfyUI's SAM 3 nodes for the masks, and a VLM for the audit. The KB's standing warning about SAM 3 applies - the ComfyUI-RMBG SAM 3 node needs Triton, which is a genuine obstacle on Windows, and users report VRAM not releasing between runs. If your masks are coming from a fine-tuned community YOLO detector instead (faces, hands, people), you already have reliable masks and probably don't need this audit at all - that's the split the masking doc draws.

Fair warning on expectations: this pack is a single author's personal pipeline (axior's DOGMA video workflow) published as nodes. It does not appear in the r/comfyui corpus, its validation notes say CPU tests with mocked model calls only, and it assumes you'll check the sheets yourself. The audit prompt is genuinely well thought out - just don't treat PASS as ground truth.

CategoryDOGMA/v1.0.10

Inputs (3)

NameTypeDefaultDescription
imageIMAGE—
candidatesDOGMA_CANDIDATES—
panel_sizeINT384256–768—

Outputs (2)

NameTypeDescription
instance_sheetsIMAGE—
audit_instructionsSTRING—