DOGMA VerifiedPlan8 v1.0.11
A second VLM gets to veto the first one's categories
- proposal
- plan_preview
- category_1
- sam_prompt_1
- sam_threshold_1
- category_2
- sam_prompt_2
- sam_threshold_2
- category_3
- sam_prompt_3
- sam_threshold_3
- category_4
- sam_prompt_4
- sam_threshold_4
- category_5
- sam_prompt_5
- sam_threshold_5
- category_6
- sam_prompt_6
- sam_threshold_6
- category_7
- sam_prompt_7
- sam_threshold_7
- category_8
- sam_prompt_8
- sam_threshold_8
Ask a vision model what's in a photograph and it will tell you about a photograph like that one. A prompt mentioning 1970s Italy gets you "Vespa," "cobbled street," "shuttered windows" - whether or not a single Vespa is in frame. Text SAM then dutifully finds something Vespa-shaped and your mask pipeline inherits a hallucination.
This node is the veto. It takes the categories your planner proposed, plus a second, independent visual check of those categories, and outputs only the ones a model actually saw.
How it works
In goes proposal (the DOGMA_PLAN bundle from a ProposeCategories node) and presence_text - a JSON array of {id, verdict, evidence} objects, one per proposed category, produced by a VLM answering the presence prompt. The prompt that generates it is deliberately blind: the check node builds it from id and category only, with no evidence from the first model, and instructs: check the actual photograph independently… do not invent objects from setting, era or expected scene contents.
The rules for accepting a category are strict, and they're all in the same place:
- the verdict must be exactly
present- notuncertain, notabsent; - it must come with non-empty evidence text;
- the id must be an integer, and must not appear twice in the response. Duplicate ids are tracked separately and disqualify the category, because a model that answers twice for one slot is not a model you should trust on that slot.
Everything else is skipped with a visible reason line: arch: SKIPPED (uncertain) - too small to identify. Nothing is silently dropped.
The inputs and outputs
proposal(DOGMA_PLAN) - fromDOGMAProposeCategoriesV111.presence_text(STRING) - the VLM's JSON verdicts. If you prefer the model not to run when there's nothing to check, the pack pairs this with a lazy presence-text node.sam_threshold(FLOAT, default 0.4, range 0.05–0.9) - the detection threshold handed to every accepted slot. Unlike the older planner, this one is a real widget, so you can raise it to fight blobby masks or lower it for faint targets.plan_preview(STRING) - the audit trail:category: CONFIRMED / SKIPPED (verdict) - evidencefor every proposal. Its first line literally says "VISUAL PRESENCE CHECK (can still be wrong; inspect the masks)," which is the most honest UX text in the pack.category_1…category_8,sam_prompt_1…sam_prompt_8- the category name and its semicolon-joined queries, one triple per slot.sam_threshold_1…sam_threshold_8- the same threshold, repeated per slot so it can be wired directly into eight search nodes.
Rejected proposals leave none in their slot with an empty prompt, so the downstream search node sees nothing to do - that's the intended way to skip a category without rewiring anything.
Install
Manager → search DOGMA Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
Restart. The pack's only Python dependency is scipy>=1.10, and this node just parses text - but the planner chain upstream needs comfyui_vlm_nodes (for ModernVLM) and your own VLM answer to the presence prompt.
The honest limits
Presence checking filters hallucinations; it does not guarantee coverage or correctness. A model that says absent on your awning has removed a real category, and the pack's own copy admits the check "is still probabilistic recognition, not a guarantee." Two habits make it behave: read plan_preview before queuing, and when a category you can see with your own eyes gets skipped, re-run the presence check rather than arguing with the threshold. The node is only as good as the second opinion behind it - and pick a capable VLM, because "is there a category called architectural arch visible in this photo" is a harder question than it sounds, especially at small sizes where uncertain is genuinely the correct answer.
If you're on the 1.0.12 line, its VerifiedPlan8 v1.0.12 does the same thing with a line-based presence format and an extra planner_status input for the report. Same wiring, better provenance.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| proposal | DOGMA_PLAN | — | |
| presence_text | STRING | — | |
| sam_threshold | FLOAT | 0.400.05–0.9 | — |
Outputs (25)
| Name | Type | Description |
|---|---|---|
| plan_preview | STRING | — |
| category_1 | STRING | — |
| sam_prompt_1 | STRING | — |
| sam_threshold_1 | FLOAT | — |
| category_2 | STRING | — |
| sam_prompt_2 | STRING | — |
| sam_threshold_2 | FLOAT | — |
| category_3 | STRING | — |
| sam_prompt_3 | STRING | — |
| sam_threshold_3 | FLOAT | — |
| category_4 | STRING | — |
| sam_prompt_4 | STRING | — |
| sam_threshold_4 | FLOAT | — |
| category_5 | STRING | — |
| sam_prompt_5 | STRING | — |
| sam_threshold_5 | FLOAT | — |
| category_6 | STRING | — |
| sam_prompt_6 | STRING | — |
| sam_threshold_6 | FLOAT | — |
| category_7 | STRING | — |
| sam_prompt_7 | STRING | — |
| sam_threshold_7 | FLOAT | — |
| category_8 | STRING | — |
| sam_prompt_8 | STRING | — |
| sam_threshold_8 | FLOAT | — |