DOGMA Semantic Plan v21 — Global First
Six slots, family dedupe, and a priority order you should understand
- 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
What it is
DOGMASemanticPlanV21 is the planner from the pack's v21 generation, whose stated pipeline order is in a comment above the class: "Global conservative restoration -> SAM -> macro edits." That's a shift in strategy from v16. Instead of leaning on local detail passes to fix everything, v21 does a gentle whole-frame restoration first, then uses SAM and large region crops only for what's still broken. The planner's job shifts accordingly: it's now choosing which few categories earn a local edit pass on top of a global one.
"Global First" in the display name is that ordering, not a property of this node - the node itself is still text in, categories out.
What changed from v16
Dedupe is by family, not by string. v16 dropped duplicate category names; v21 maps each category through a family classifier first and drops anything whose family has already been claimed. car, automobile and truck all map to vehicles, so three lines about cars collapse to one slot. That's a real fix: on a five-slot budget, wasting slots on synonyms of the same thing is how you end up with no slot for faces.
Six slots, and a priority order. The twelve families are sorted before they're assigned, so a VLM's unordered inventory arrives in a deterministic sequence:
architecture 10, road 20, vegetation 30, sky 35, water 36,
vehicles 50, street_objects 60, animals/furniture/machinery/product/food 62,
clothing 64, roadway_people 70, people 75, other 80, signage 100
Read it bottom-up and it's a risk ranking. Broad environmental categories come first because they're cheap and low-risk to repair in place; people and faces sit near the end because they're the highest-stakes edits; signage is dead last and effectively never survives a six-deep cut. Earlier generations let the "forbidden" list do the text protection; v21 does it with priority ordering, and between the two, signage ends up protected either way.
No forbidden-word list. v16's blacklist is gone; v21 leans on the classifier instead. _dogma_v21_family maps anything it recognises to one of twelve families and everything else to other - which means "artifact" and "background" don't get silently deleted, they get classified. Worth knowing if you're porting a v16 graph and wondering why the behaviour changed.
Inputs and outputs
planner_text - STRING, multiline, forceInput. Wire a text source into it; there's no widget on the node.
Outputs are the six-slot layout the rest of the later pack is built for: plan_preview (a per-slot dump with the family tagged on, e.g. SLOT 3: street lamp [street_objects] - read it, it shows you exactly which lines were merged or dropped), then six groups of category_N, sam_prompt_N, sam_threshold_N.
The SAM prompts come from a family-level policy table, so they're shorter and broader than v16's keyword-specific ones: vehicles is car:180,bus:16,truck:16,van:16,motorcycle:10,bicycle:10 at 0.14, people is person:120 at 0.18, architecture is building:40,facade:40 at 0.28. There's a none entry too - placeholder prompt, threshold 0.90 - so unused slots stay quiet.
Install
ComfyUI Manager → DOGMA Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
# restart ComfyUI
No external dependencies; the pack's requirements.txt is a comment and the code uses PyTorch, numpy and ComfyUI's own utilities. You will need a SAM-style detector node from another pack to use the prompts.
Gotchas
- The family classifier is keyword-based and greedy.
building wallmaps to architecture, and so doeswindow, because the keyword list includes both. If you need windows handled differently from buildings, you can't express that in one planner slot. - Prioritisation only matters when you have more than six families. Below that, you get everything you asked for, just reordered.
- If you were relying on v16's blacklist to strip "background" out of a sloppy VLM inventory, upgrade your expectations instead - v21 will happily classify it as
otherand hand you a 0.24-threshold prompt for it. - Zero reddit coverage for this pack, and a README that skips the semantic detailer entirely. The class docstrings and the code are all you get.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| planner_text | STRING | — |
Outputs (19)
| 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 | — |