Nodes/DOGMA Nodes/DOGMA Semantic Plan v21 — Global First
ComfyUI Node

DOGMA Semantic Plan v21 — Global First

Six slots, family dedupe, and a priority order you should understand

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA Semantic Plan v21 — Global First
    • 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
    planner_text

    What it is

    DOGMASemanticPlanV21 is the planner from the pack's v21 generation, whose stated pipeline order is in a comment above the class: "Global conservative restoration -> SAM -> macro edits." That's a shift in strategy from v16. Instead of leaning on local detail passes to fix everything, v21 does a gentle whole-frame restoration first, then uses SAM and large region crops only for what's still broken. The planner's job shifts accordingly: it's now choosing which few categories earn a local edit pass on top of a global one.

    "Global First" in the display name is that ordering, not a property of this node - the node itself is still text in, categories out.

    What changed from v16

    Dedupe is by family, not by string. v16 dropped duplicate category names; v21 maps each category through a family classifier first and drops anything whose family has already been claimed. car, automobile and truck all map to vehicles, so three lines about cars collapse to one slot. That's a real fix: on a five-slot budget, wasting slots on synonyms of the same thing is how you end up with no slot for faces.

    Six slots, and a priority order. The twelve families are sorted before they're assigned, so a VLM's unordered inventory arrives in a deterministic sequence:

    architecture 10, road 20, vegetation 30, sky 35, water 36,
    vehicles 50, street_objects 60, animals/furniture/machinery/product/food 62,
    clothing 64, roadway_people 70, people 75, other 80, signage 100
    

    Read it bottom-up and it's a risk ranking. Broad environmental categories come first because they're cheap and low-risk to repair in place; people and faces sit near the end because they're the highest-stakes edits; signage is dead last and effectively never survives a six-deep cut. Earlier generations let the "forbidden" list do the text protection; v21 does it with priority ordering, and between the two, signage ends up protected either way.

    No forbidden-word list. v16's blacklist is gone; v21 leans on the classifier instead. _dogma_v21_family maps anything it recognises to one of twelve families and everything else to other - which means "artifact" and "background" don't get silently deleted, they get classified. Worth knowing if you're porting a v16 graph and wondering why the behaviour changed.

    Inputs and outputs

    planner_text - STRING, multiline, forceInput. Wire a text source into it; there's no widget on the node.

    Outputs are the six-slot layout the rest of the later pack is built for: plan_preview (a per-slot dump with the family tagged on, e.g. SLOT 3: street lamp [street_objects] - read it, it shows you exactly which lines were merged or dropped), then six groups of category_N, sam_prompt_N, sam_threshold_N.

    The SAM prompts come from a family-level policy table, so they're shorter and broader than v16's keyword-specific ones: vehicles is car:180,bus:16,truck:16,van:16,motorcycle:10,bicycle:10 at 0.14, people is person:120 at 0.18, architecture is building:40,facade:40 at 0.28. There's a none entry too - placeholder prompt, threshold 0.90 - so unused slots stay quiet.

    Install

    ComfyUI Manager → DOGMA Nodes, or:

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

    No external dependencies; the pack's requirements.txt is a comment and the code uses PyTorch, numpy and ComfyUI's own utilities. You will need a SAM-style detector node from another pack to use the prompts.

    Gotchas

    • The family classifier is keyword-based and greedy. building wall maps to architecture, and so does window, because the keyword list includes both. If you need windows handled differently from buildings, you can't express that in one planner slot.
    • Prioritisation only matters when you have more than six families. Below that, you get everything you asked for, just reordered.
    • If you were relying on v16's blacklist to strip "background" out of a sloppy VLM inventory, upgrade your expectations instead - v21 will happily classify it as other and hand you a 0.24-threshold prompt for it.
    • Zero reddit coverage for this pack, and a README that skips the semantic detailer entirely. The class docstrings and the code are all you get.
    CategoryDOGMA/Semantic Detailer

    Inputs (1)

    NameTypeDefaultDescription
    planner_textSTRING

    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