DOGMA InstanceReview v56.7
One verdict per mask, or nothing at all
- candidates
- review
- audit_report
This is where the vision model's opinions become a mask list. It reads the text answers, decides PASS or FAIL for each one, keeps the passes, and - unlike the v56.6 gate - it can read a sentence instead of requiring one magic word.
How the verdict parsing works
The rule that matters is simple and strict: the answer has to start with PASS or FAIL. Read the source and it becomes clear the author was burned by chatty models:
- any
thinking...block is stripped first; - the text is stripped of backticks, asterisks and whitespace;
- a regex requires
PASSorFAILat the very start of what remains; - and even then, if the word
FAILappears anywhere later in the string, it's a fail. So "PASS - although there is a FAIL-ish region at the top" is a fail, not a pass; - no match at the start means fail. Silence is rejection.
That last point is the design philosophy in one line: an unparseable answer is not a vote to keep a mask. Compare it with the v56.6 gate, which compares the stripped text to the literal string PASS - so a period, or any reason appended, zeroes your masks. This node is the fix for that fragility, and it means you can now ask your VLM for "PASS or FAIL, then a short reason", which is what DOGMAInstanceAuditViewV567's instruction does.
The alignment rule
Here's the bit that stops bad runs:
DOGMA: 12 masks but 11 audit answers. No guessing by position.
If the candidate count and the answer count don't match, the node raises instead of pairing them by index. It's a list node (INPUT_IS_LIST), so both inputs arrive as lists, and the check is exact - one answer per mask, in order, no gap-filling. Individual failures inside the batch are fine; a missing answer is not.
Inputs and outputs
- candidates -
DOGMA_CANDIDATES, straight fromDOGMASAMSearchV567. Exactly one bundle, please: two candidates inputs and it raises. - audit_text - the STRING list from your VLM, usually routed through
DOGMAAuditTextV567first so inactive slots don't drag the audit into running at all.
Outputs:
- review - a
DOGMA_REVIEWbundle: the category, the image shape, the accumulated accepted items, and the notes. This is whatDOGMAFinalMasksV567consumes, and it's what you feed back into a second search pass inlocal_recoverymode as thepreviousinput. - audit_report - the notes as text: one line per candidate, with
PASSorRETRY/REJECTand the first 200 characters of the model's answer, plus everything the search pass noted.
That report is the thing to actually read when results are disappointing. It tells you whether the SAM search found the object at all, or found it and had it rejected on audit - two completely different problems with two completely different fixes.
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 load a current graph; the phase-3 nodes were introduced opt-in across pack 1.0.5 and 1.0.6, and the review bundle only makes sense wired to its sibling nodes. The pack downloads no models - the VLM and the SAM 3 nodes are your own install.
Gotchas
Empty candidate lists are legal here. No items means nothing to review, so the loop does nothing and the bundle carries forward with an empty accepted list. That's by design; the loud failure lives downstream in DOGMAFinalMasksV567, which knows the difference between an empty pipeline slot and a category that genuinely found nothing.
Don't reuse a review bundle across categories. A local_recovery pass takes a previous bundle and checks that the category and the image dimensions match - a bundle built for "vehicles" on one crop size can't be recycled for "buildings". This node will happily produce such a bundle; it's the search node that refuses it.
A VLM that prefixes its answer with a role label will fail everything. If your answers come back as assistant PASS or wrapped in markdown, every verdict is a fail and you'll see 0 verified instances from the final node rather than an obvious parse error. Check the audit report's first lines before you go hunting for a segmentation problem.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| candidates | DOGMA_CANDIDATES | — | |
| audit_text | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| review | DOGMA_REVIEW | — |
| audit_report | STRING | — |