Nodes/DOGMA Nodes/DOGMA InstanceReview v1.0.9
ComfyUI Node

DOGMA InstanceReview v1.0.9

Turns your VLM's PASS/FAIL chatter into a mask decision

By axior·Created 6 months ago·Updated 16 days ago· 2
DOGMA InstanceReview v1.0.9
  • candidates
  • review
  • audit_report
◄audit_text—►

What it is

The parser. DOGMAInstanceAuditViewV109 produces audit sheets and instructions; a VLM produces prose; this node reads that prose and either keeps or rejects each candidate mask, then hands you a DOGMA_REVIEW bundle for the finisher.

Two inputs, two outputs, and one rule that will bite you if you don't know it.

The verdict rule

For each answer it calls a tiny function that does this:

  1. Strip a closed think … end-of-think block if present.
  2. Trim backticks, asterisks and whitespace.
  3. Require the text to start with PASS or FAIL.
  4. Accept only if it started with PASS - and the word FAIL appears nowhere in it.

That last clause is stricter than it looks, and it's the source of the most confusing behaviour you'll hit. A perfectly reasonable VLM answer like:

PASS - the selection follows the visible masonry of the arch; nothing here indicates a FAIL

is rejected. It starts with PASS, but the token FAIL is present, so verdict() returns false and the mask is dropped. Same with any answer that begins with "Looking at the image…" - no leading PASS, rejected. Same with a model that leaves its reasoning tag unclosed: the closed-tag stripper only handles think … end-of-think, so the raw thinking text is what gets matched against, and it starts with a verb.

The design assumption is a model that replies exactly PASS: short reason or FAIL: short reason, which is what the companion instruction string asks for. If you're on a reasoning model with a different thinking syntax, either use a template that suppresses reasoning or put a text-cleaning node in between - otherwise you'll see suspiciously few masks survive and blame the segmenter.

The count rule

audit_text is a list, and the reviewer requires exactly one answer per candidate mask:

ValueError: DOGMA: 6 masks but 4 audit answers. No guessing by position.

No padding, no ceil(n/2), no fallback. The message is the pack's tone in a nutshell: if it can't be sure which verdict belongs to which mask, it stops rather than guess. The practical corollary is that anything upstream of this node that can change list length - a VLM node that drops empties, a reroute through a concat, a batching node - has to be checked. If you want grouped audits, that's the DOGMAAuditBatchV110/V111/V114 family, which batches two or four per call and pairs with their own reviewers.

Inputs and outputs

  • candidates (DOGMA_CANDIDATES) - the search bundle, same object the audit view consumed.
  • audit_text (STRING, forced to a wire) - the VLM's answers, as a list, one per mask, in order.

Both are list-typed on the node (INPUT_IS_LIST), matching how ComfyUI maps a VLM over sheets.

Outputs:

  • review (DOGMA_REVIEW) - the bundle with accepted masks appended and notes attached. Feed it to DOGMAFinalMasksV109, or any of the other finishers.
  • audit_report (STRING) - one line per instance: #3 solver/global/1/person/2: PASS or RETRY/REJECT followed by the first 200 characters of the model's answer. That 200-char truncation is deliberate: it's enough to see why without dumping a novel into your console.

Unlike the batch reviewers, there is no audit_mode here - no report-only escape hatch. A non-PASS answer means the mask is not in the accepted list, full stop. If you want to inspect verdicts before they take effect, run the batch family first, or read the report and accept that this node already acted on it.

Where this fits in a bigger picture

Every semantic masking pipeline in ComfyUI eventually needs this exact piece - something that converts a model's judgement into a graph decision - and the KB's read on the field is that promptable segmentation (SAM 3's text mode, GroundingDINO-plus-SAM before it) plus an audit is now the standard shape for targets no trained detector covers: a specific object, a surface, a structural unit. The audit step is the part nobody standardised, because it depends entirely on which VLM you have. This node is a very opinionated, very literal implementation of that step, and it will not meet a chatty model halfway.

Install

Manager → search DOGMA Nodes (publisher axior), or:

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

The pack's requirements.txt is one line - scipy>=1.10 - and it downloads no models. Your VLM comes from wherever you already run it; the pack's workflows use ModernVLM from comfyui_vlm_nodes and ship a list adapter for it. Note the internal dependency too: this node delegates to the pack's v56.7 reviewer by class lookup, so a partially installed pack gives you a RuntimeError about a missing class rather than a missing input.

CategoryDOGMA/v1.0.9

Inputs (2)

NameTypeDefaultDescription
candidatesDOGMA_CANDIDATES—
audit_textSTRING—

Outputs (2)

NameTypeDescription
reviewDOGMA_REVIEW—
audit_reportSTRING—