DOGMA v39 Scene Inventory Plan
Four groups, plus kinds and confidence thresholds
- 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
Version 39 is where the planner grew a spine. Instead of handing your segmenter whatever sentence the VLM wrote, it emits a kind and a confidence threshold for every slot - the two things a segmentation stage actually needs to behave predictably.
What it parses
Same rigid inventory format as its v38 sibling, but it wants four groups, not six:
GROUP|cars|car, automobile, sedan|OBJECT
GROUP|buildings|building, facade, window|STRUCTURE
That's the order this node reads: category, then prompt, then kind. Only lines starting with GROUP| count; anything with fewer than four fields is ignored. Note that the pack's later instruction builder (DOGMAV50SceneInstruction) asks a VLM for GROUP|category|kind|prompt - kind third. Use that prompt text with this node and every sam_prompt_N becomes the word OBJECT. It's a generations-apart format mismatch, and the preview output is how you catch it. The category is lowercased and whitespace-collapsed; the third field is the segmentation prompt, and if it's empty the category name is used instead. Skipped outright: duplicates, and anything whose category contains text, logo, sign, brand or license plate - text is never an editable target in this pack, because a generative pass invents lettering rather than reading it.
The kind field is coerced to OBJECT, STRUCTURE or SURFACE, defaulting to OBJECT when the VLM writes something else. The threshold is then derived from the kind, not from the text: 0.10 for OBJECT, 0.12 for STRUCTURE, 0.10 for SURFACE. Unused slots get none, an unmatchable placeholder prompt, kind OBJECT and threshold 0.50 - high enough that nothing gets through.
Inputs and outputs
One input, inventory_text (multiline STRING). Seven outputs: preview, then four repeating triples of category_N, sam_prompt_N, kind_N, threshold_N - seventeen strings and floats in total.
preview is a formatted dump of the decision - group index, category, kind, prompt, threshold - and it's the only honest debugger you get, because every value is derived and none are editable. Wire sam_prompt_N and threshold_N into your segmenter, category_N into whatever labels the slot downstream, and read preview when the plan surprises you.
Four versus six, and why it's not a downgrade
Fewer slots isn't a limitation, it's the version's bet: four groups that the segmenter can actually resolve beats six where two produce empty masks. The kind-driven threshold is the same bet from the other side. A STRUCTURE mask (buildings, facades, windows) is a broad region with fuzzy edges; asking for 0.12 confidence trims the sloppy perimeter picks. An OBJECT at 0.10 accepts more small instances - which is what you want for cars and people at distance.
If you're coming from v40+, note the missing piece: this version does no canonicalisation. Your VLM's phrasing is the segmentation prompt, so a model that writes "vehicles in the scene" hands the segmenter something vaguer than the curated car, automobile, sedan, hatchback, station wagon you'd get two versions later. With a well-behaved VLM that's a feature; with a chatty one it's a bug.
Install
Manager → search DOGMA Nodes → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
No dependencies, no models to download - the pack's requirements.txt is a comment reading "No external dependencies", and this node is text parsing in pure Python. It registers under DOGMA/v39, a different category to the v38 nodes' DOGMA/Semantic Detailer, which is worth knowing when you're hunting in the node search after an update.
You need three other things for this to do anything: a VLM in-graph producing the inventory (a local Qwen3-VL is the usual choice - it's the community's default vision model, and it was literally trained on bounding boxes), a segmenter consuming the prompts, and a sampler for the repair. The pack is axior's in-house tooling, from the studio arm of a Milan production team doing commercial AI work with heavy ComfyUI inpaint chains.
Troubleshooting
All four slots inactive. Nothing parsed - your VLM didn't emit GROUP| lines. Check the raw text output from the VLM node, and prefer the pack's own instruction text (DOGMAV50SceneInstruction) as the prompt.
Thresholds look wrong for your segmenter. They're hard-coded per kind, so if your segmentation node's confidence semantics run the other way, you get empty masks or everything at once with no widget to fix it. That's the version boundary: v42 raises thresholds into the 0.16–0.22 range, v44 drops them to 0.02–0.06 for high recall. If v39's calibration doesn't match your model, move along the family rather than fighting it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| inventory_text | STRING | — |
Outputs (17)
| 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 | — |