Nodes/DOGMA Nodes/DOGMA Semantic Plan v23 — Discrete Objects Only
ComfyUI Node

DOGMA Semantic Plan v23 — Discrete Objects Only

DOGMA Semantic Plan v23

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA Semantic Plan v23 — Discrete Objects Only
    • 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

    Nineteen outputs, no inputs, and it will run on the first try. This is the debugging floor of the DOGMA pack: a hard-coded six-slot restoration plan you can drop into a fresh graph to prove your SAM wiring, crop logic and stitch work before you add a vision model to the party.

    If you've ever spent an evening chasing a broken pipeline only to discover the VLM was returning nonsense, that's the case for it.

    What it is

    A "semantic plan" in this pack is a list of jobs. Each slot holds a category name, a SAM text prompt, and a detection threshold. Slot 1 is road support with a prompt of road:80,street:80,asphalt:80,traffic lane:60,intersection:40,roadway:60 at threshold 0.12; slot 2 is vehicles; then roadway people, people, street furniture, and signage. Six categories, six SAM prompts, six thresholds, exactly the plan.

    The node is deterministic by design. Later versions of this pipeline replace the fixed list with a planner node that parses a Qwen3-VL inventory of the scene, and those are better when the photo contains something the fixed list never imagined. This one is the version you use when you want the pipeline itself to be a known quantity - you're testing crop sizing, mask morphology, stitch blending, VRAM behaviour - rather than testing a language model.

    It also encodes a design opinion worth knowing before you copy it downstream: broad surfaces get detected so they can be protected, not regenerated. The docstring says it outright - "Broad surfaces are support/protection only; generative semantic passes are reserved for discrete objects where SAM is reliable enough to be useful." That's why road support exists at all, and why in the later versions kind is a first-class concept, with SURFACE categories given gentler mask growth and lower detail strength than OBJECT ones.

    The outputs that matter

    There are 19, in a repeating triple, plus a preview:

    • plan_preview (STRING) - the whole plan as formatted text: slot number, category, family, SAM prompt, threshold. Wire it to a text preview; it's your read on what the graph is about to do.
    • category_1category_6 (STRING) - the category names. These feed the nodes that build per-category prompts and settings, and in the crop nodes the category string is what decides grouping behaviour.
    • sam_prompt_1sam_prompt_6 (STRING) - comma-separated multi-concept prompts like person:180,pedestrian:180,human:180, with the number as the per-concept weight. These go into a text-prompted segmenter, so you need a SAM-family node that accepts a phrase rather than a point or a box.
    • sam_threshold_1sam_threshold_6 (FLOAT) - 0.12 through 0.18 in the fixed plan. Lower means more detections, including junk.

    The wiring is one segmenter per slot: sam_prompt_i plus sam_threshold_i into SAM, mask_i out. Every one of the six gets sampled whether or not the category is present in your photo - which is exactly why the thresholds matter. A signage pass on a landscape with no signage returns nothing, and that's fine; a people pass at too low a threshold returns shadows and window reflections as people, and now you're repairing ghosts.

    Install

    ComfyUI Manager → search DOGMA Nodes (publisher axior), install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
    # restart ComfyUI
    

    No pip dependencies (requirements.txt is just a "no external dependencies" comment) and no weights in the repo. The segmenter you pair it with is a separate install - SAM 3's text-prompt nodes, or Grounded SAM - and if you're on the VLM-driven variants of this plan node instead, budget the Qwen3-VL download too. That's a real cost on a small card, which is half the reason this node exists.

    Common issues

    The plan node itself can't fail. Everything around it can, and two things bite here specifically.

    First, six SAM passes at once is six model loads and six mask batches in flight. On a 12GB card this is where you find out whether your graph has VRAM discipline, which is the gap the pack's cleanup and barrier nodes fill - DOGMAImageVRAMCleanupV14 and friends. If you see the run die after the last mask and before the first crop, that's the boundary to fix.

    Second, the fixed plan is city-street specific: roads, vehicles, people, street furniture, signs. Point it at a studio portrait and three of the six slots will fire on nothing. It's a starter, not a scene-understanding system - the whole reason the author shipped planner nodes in v16, v23, v24, v27, v31, v35.4, v38 and v39 was to get away from a fixed list. Use this one to prove the plumbing, then move to a plan node that reads your image.

    CategoryDOGMA/Semantic Detailer

    Inputs (0)

    No inputs

    Outputs (19)

    NameTypeDescription
    plan_previewSTRING
    category_1STRING
    sam_prompt_1STRING
    sam_threshold_1FLOAT
    category_2STRING
    sam_prompt_2STRING
    sam_threshold_2FLOAT
    category_3STRING
    sam_prompt_3STRING
    sam_threshold_3FLOAT
    category_4STRING
    sam_prompt_4STRING
    sam_threshold_4FLOAT
    category_5STRING
    sam_prompt_5STRING
    sam_threshold_5FLOAT
    category_6STRING
    sam_prompt_6STRING
    sam_threshold_6FLOAT