DOGMA v37 Fixed Categories
Six hard-coded category slots and the SAM prompts that find them
- category_1
- sam_prompt_1
- category_2
- sam_prompt_2
- category_3
- sam_prompt_3
- category_4
- sam_prompt_4
- category_5
- sam_prompt_5
- category_6
- sam_prompt_6
- summary
This is the simplest node in the pack and possibly the most useful one to read first, because it tells you exactly what the whole pipeline is doing. It has no inputs at all. It outputs six category names and six text prompts, and the prompts are SAM prompts - the vocabulary you hand a promptable segmenter so it knows what to look for.
Why you'd reach for it
The newer half of detection is promptable segmentation: describe the region in words and let SAM or a Grounded-SAM pair find it, instead of waiting for a trained YOLO for your specific object. The catch is that promptable segmenters are only as good as your phrasing, and the phrasing that works is weird. You don't write "cars," you write car:500,automobile:400,vehicle:350. The number is a per-phrase weight - tell it car matters more than bicycle and it stops drifting to bikes on a street full of both.
Getting that right per category is fiddly, unglamorous work. This node is somebody's answer to it: six categories, six pre-written weighted prompts, done.
What it emits
No inputs. Thirteen outputs, and the mapping is fixed:
| slot | category | SAM prompt |
|---|---|---|
| 1 | vehicles | car:500,automobile:400,vehicle:350,parked car:300,bus:180,truck:180,van:180,motorcycle:100,bicycle:100 |
| 2 | people | person:420,pedestrian:380,human:320,standing person:220,walking person:220 |
| 3 | architecture | building:380,facade:380,window:340,door:220,balcony:260,architectural detail:280 |
| 4 | vegetation | grass:450,lawn:450,vegetation:380,tree:260,bush:240,shrub:240,foliage:240 |
| 5 | street_objects | street lamp:200,traffic light:200,pole:240,railing:200,bollard:160,bench:140,street furniture:220 |
| 6 | road_ground | road:480,street:450,asphalt:450,pavement:340,sidewalk:340,curb:260,ground:320 |
That's the full output list: category_1 through category_6, sam_prompt_1 through sam_prompt_6, and summary, which is just a numbered text listing of the six category names for eyeballing.
The intended wiring is a fan-out: each category_n goes into a settings node (DOGMACategorySettingsV22/V23/V24) and each sam_prompt_n goes into your segmentation node. That's why it's fixed rather than a planner - it removes the VLM from the loop. There's no vision model to load, no prompt to hallucinate a seventh category, no API call, and it runs instantly. If your images are street scenes, this is a completely reasonable pipeline and vastly cheaper than letting a model decide what's in the frame.
If your images are portraits, obviously, this is useless.
The category names are not free-form
Worth internalising before you wire anything: those six strings are matched by substring against a keyword list elsewhere in the pack, and that match decides everything downstream - grouping radius, crop size, and whether the category is regenerated at all. street_objects contains "street", which is a road keyword; the matcher checks the street-furniture keywords ("pole", "bench", "bollard", "street light"…) before the road keywords, so it lands where you'd want. Most of the neighbours behave, but the matcher is literal enough that carpet resolves to vehicles and texture resolves to signage. Renaming a slot to something the matcher doesn't recognise drops you to the generic other policy, which works, just without any tuning.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
Or ComfyUI Manager, searching DOGMA Nodes, or comfy node install comfyui-dogma-nodes. No Python dependencies - the requirements.txt in the repo is a single comment line, pyproject.toml declares an empty dependency list, and the whole thing is torch plus ComfyUI's own sampler APIs.
Note what you do need, and it isn't in this pack: a segmentation model. This node hands you prompts; something else has to run SAM or Grounded SAM on the image and produce masks. Install an Impact Pack-style detector or a SAM node pack alongside it, and budget the VRAM for whichever segmenter you pick - that's the expensive model in this pipeline, not the diffuse pass.
Where people get burned
The one real gotcha is expecting configurability. There is no widget, no text field, no "add a category" - it's six slots, baked. Editing means editing the Python, and since every other node in this pack is versioned, your edit may or may not survive the next release. If you want the model to choose the categories, that's the scene-inventory and semantic-plan branches of the same pack, which are a lot more machinery and a lot more ways to go sideways.
Also: don't read the SAM prompts as universal. They're tuned for the author's subject matter - Italian street photography, circa 1972–1978, per the prompts elsewhere in the pack. For your own material, take the shape of the thing (weighted, comma-separated, most-specific noun first) and rewrite the contents.
Inputs (0)
No inputs
Outputs (13)
| Name | Type | Description |
|---|---|---|
| category_1 | STRING | — |
| sam_prompt_1 | STRING | — |
| category_2 | STRING | — |
| sam_prompt_2 | STRING | — |
| category_3 | STRING | — |
| sam_prompt_3 | STRING | — |
| category_4 | STRING | — |
| sam_prompt_4 | STRING | — |
| category_5 | STRING | — |
| sam_prompt_5 | STRING | — |
| category_6 | STRING | — |
| sam_prompt_6 | STRING | — |
| summary | STRING | — |