Nodes/DOGMA Nodes/DOGMA v40 Six Diverse Scene Groups
ComfyUI Node

DOGMA v40 Six Diverse Scene Groups

A fixed vocabulary instead of the VLM's own words

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA v40 Six Diverse Scene Groups
    • 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
    inventory_text

    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 - carscar, automobile, sedan, hatchback, station wagon, buildingsbuilding, facade, window, balcony, treestree, 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.

    CategoryDOGMA/v40

    Inputs (1)

    NameTypeDefaultDescription
    inventory_textSTRING

    Outputs (25)

    NameTypeDescription
    previewSTRING
    category_1STRING
    sam_prompt_1STRING
    kind_1STRING
    threshold_1FLOAT
    category_2STRING
    sam_prompt_2STRING
    kind_2STRING
    threshold_2FLOAT
    category_3STRING
    sam_prompt_3STRING
    kind_3STRING
    threshold_3FLOAT
    category_4STRING
    sam_prompt_4STRING
    kind_4STRING
    threshold_4FLOAT
    category_5STRING
    sam_prompt_5STRING
    kind_5STRING
    threshold_5FLOAT
    category_6STRING
    sam_prompt_6STRING
    kind_6STRING
    threshold_6FLOAT