DOGMA v40 Six Diverse Scene Groups
A fixed vocabulary instead of the VLM's own words
- preview
- category_1
- sam_prompt_1
- kind_1
- threshold_1
- category_2
- sam_prompt_2
- kind_2
- threshold_2
- category_3
- sam_prompt_3
- kind_3
- threshold_3
- category_4
- sam_prompt_4
- kind_4
- threshold_4
- category_5
- sam_prompt_5
- kind_5
- threshold_5
- category_6
- sam_prompt_6
- kind_6
- threshold_6
The pitch of v40 is in its display name: six groups, and they have to be diverse. The problem it solves is boring and real - ask a VLM for what's in a street photo and you get cars, cars again, another car, and the road. Then you run six segmentation passes to segment the same thing five times.
What it does differently
It still reads GROUP|category|prompt|kind lines, but it stops trusting them for anything it can decide itself:
Canonicalisation. Every category is run through a regex matcher that folds it into a fixed vocabulary: cars, bus, trucks, people, buildings, grass, trees, sky, road, water, mountains, animals, furniture. "Automobiles", "sedans", "station wagons" and "vehicles" all become cars. "Facades" becomes buildings. Anything outside the list is truncated and kept as-is. That means the label on your crop is stable across images, and your downstream switches can match on it.
Diversity caps. Each category belongs to a family - vehicles (cars/bus/trucks), human, structure, vegetation (grass/trees), surface - and each family is capped: two for vehicles, one for everything else. The first five cars in the inventory become one cars group, not five slots. This is the whole point of the version.
Kind from category, not from the VLM. buildings is forced to STRUCTURE; sky, road, water, mountains and grass to SURFACE; everything else OBJECT. The VLM's opinion on kind is discarded, because a surface and a structure want different treatment downstream (in DOGMARegionStitchV543, surfaces and structures get a wider 10px feather than objects' 5px).
Curated prompts. Each canonical category maps to a fixed concept list - cars → car, automobile, sedan, hatchback, station wagon, buildings → building, facade, window, balcony, trees → tree, bush, shrub, foliage. No colon-weighted syntax, no thresholds embedded in the string; the confidence number comes out separately.
Thresholds. 0.055 for cars, bus, trucks and people; 0.075 for STRUCTURE; 0.060 otherwise. Low, i.e. permissive - this version is tuned to find small repeated objects. Unused slots get none and the unmatchable nonexistent_placeholder_object_xyz:1.
Inputs and outputs
inventory_text (multiline STRING) in. Out: preview, then six repeats of category_N, sam_prompt_N, kind_N, threshold_N. The preview prints GROUP 1: cars [OBJECT] | SAM: car, automobile, ... | threshold=0.055, which makes auditing the canonicalisation trivial.
Install
Manager → search DOGMA Nodes → install → restart ComfyUI. Manual path:
cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
Pure Python, no dependencies, no model downloads - the pack's requirements.txt says "No external dependencies". It registers in DOGMA/v40. You'll want the usual three neighbours: a VLM writing the inventory, a segmenter eating the prompts and thresholds, and an edit model for the repair passes.
DOGMA Nodes is by axior - the studio half of a Milan production team doing commercial AI work with heavy ComfyUI inpaint chains. The diversity cap is a studio answer: when your subject is a 1970s city street, six subtly different interpretations of "cars" is six times the render cost for no extra coverage.
The trade-off
You've traded fidelity to the image for a predictable, machine-checkable plan. On a street scene that's a straight win. On an unusual image - one big weird object and nothing else - canonicalisation can erase the category you actually cared about, because it isn't in the vocabulary and gets truncated while the generic families fill the slots. If your images aren't street scenes, v43 (which caps vehicles at three and keeps vegetation separate) or v44 (which refuses to invent and orders objects first) may fit better. Read the preview on both before committing.
And remember the caps are silent. If the VLM reported six vehicle types and you get one cars slot, that's not a parse failure - that's the version doing what it says on the tin.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| inventory_text | STRING | — |
Outputs (25)
| Name | Type | Description |
|---|---|---|
| preview | STRING | — |
| category_1 | STRING | — |
| sam_prompt_1 | STRING | — |
| kind_1 | STRING | — |
| threshold_1 | FLOAT | — |
| category_2 | STRING | — |
| sam_prompt_2 | STRING | — |
| kind_2 | STRING | — |
| threshold_2 | FLOAT | — |
| category_3 | STRING | — |
| sam_prompt_3 | STRING | — |
| kind_3 | STRING | — |
| threshold_3 | FLOAT | — |
| category_4 | STRING | — |
| sam_prompt_4 | STRING | — |
| kind_4 | STRING | — |
| threshold_4 | FLOAT | — |
| category_5 | STRING | — |
| sam_prompt_5 | STRING | — |
| kind_5 | STRING | — |
| threshold_5 | FLOAT | — |
| category_6 | STRING | — |
| sam_prompt_6 | STRING | — |
| kind_6 | STRING | — |
| threshold_6 | FLOAT | — |