Nodes/DOGMA Nodes/DOGMA SemanticPlan v56.7
ComfyUI Node

DOGMA SemanticPlan v56.7

Turning a scene inventory into five wired categories

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA SemanticPlan v56.7
    • 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
    planner_text

    In most ComfyUI graphs you type categories into widgets. DOGMA wires them. This is the node that takes a text list of what's in the scene and fans it out into fifteen outputs - five categories, five SAM query phrases, five thresholds - so the rest of the graph is generated from a plan rather than maintained by hand.

    What it's for

    A semantic restoration pass needs to know what to look for, and the thing deciding that should be an analysis of the actual image, not a static list in a workflow. So the DOGMA flow runs a planner first - a model or a template that returns a short inventory of the visible scene - and this node converts that inventory into wired slots.

    That matters for the rest of the pipeline because the category strings it emits are the same strings the search node canonicalises, the caption instruction embeds, and the ownership arbiter sorts by priority. Getting the plan right is most of getting the run right.

    How it works

    Feed it text, one category per line. Each line is canonicalised - bullets, numbers, backticks and quotes are stripped, the rest lowercased - then filtered hard:

    • lines mapping to an inactive value are dropped;
    • duplicates are dropped (and canonicalisation is what makes duplicates detectable: "buildings", "building" and "architecture" all collapse to buildings);
    • anything longer than four words is dropped;
    • anything containing noise, blur, artifact, background, foreground, quality, signage or text is dropped - those are things you don't want to re-render, and a planner that mentions them as subjects is being unhelpful;
    • survivors are capped at five, first come first served.

    Canonicalisation collapses synonyms into four groups: buildings/architecture/facades/houses → buildings; vehicle/car/car/bus/truck/van → vehicles; person/pedestrian → people; road/street/pavement → road. Everything else passes through as itself, lowercased.

    Then fifteen outputs: for each of the five slots, (category, sam_prompt, sam_threshold). Used slots get the canonical category name, the first alias from the query table (buildings → "building", vehicles → "vehicle", people → "person", road → "road", otherwise the category itself), and a threshold. Unused slots are filled explicitly with none, query none, threshold 0.25 - and the preview says so in words: "unused slots are explicitly inactive."

    If nothing usable survives, it raises: DOGMA: the scene inventory contains no usable categories. Check the planner preview. Like the rest of v56.7, it stops rather than handing you five empty slots.

    Inputs and outputs

    • planner_text - STRING, forceInput. The inventory: one category per line, plain words.

    Outputs, in order: plan_preview (a short text summary: how many visible categories, then a numbered list). Then, for slots 1 through 5: category_1category_5, sam_prompt_1sam_prompt_5, sam_threshold_1sam_threshold_5. Categories go to the ownership arbiter and the search nodes; SAM prompts go to the SAM node's text conditioning; thresholds to the detector's threshold input.

    One practical note: every one of those thresholds comes out at 0.25. The node doesn't compute per-category values - it hands you a wired 0.25 and lets you tune at the SAM node. So treat the threshold outputs as plumbing (so the slot is wired) rather than as a per-category recommendation.

    Install

    comfy node install comfyui-dogma-nodes
    # or
    cd ComfyUI/custom_nodes
    git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
    pip install -r ComfyUI-DOGMA-Nodes/requirements.txt
    

    Restart, then load a v56.7 graph - the README's guidance for the current release is Manager update, restart, load V56.19. This node needs no models and no GPU; the planner that fills planner_text is the interesting part and it's whatever you or the shipped workflow uses (DOGMA's graphs run a vision-language model over the image to produce the inventory).

    Gotchas

    Read plan_preview before anything else runs. It's the cheapest debug output in the pack: it tells you the final category list and count, after canonicalisation and filtering, which is exactly what the rest of the graph will act on. Nine times out of ten, a disappointing run starts with a preview showing three categories where you expected five.

    The keyword filter will surprise you. "Sky" is fine; "sky gradient and clouds" gets dropped for being long. "Street signage" gets dropped for the word signage - deliberate, since the v56.5/v56.6 passes treat text as something to preserve, not regenerate. If you genuinely want a category whose name contains one of the banned words, you'll need a different plan path.

    Five slots is a hard ceiling. Sixth category does not get a slot, and nothing warns you - the preview just says five. On a busy street scene that's a real constraint: you'll be choosing between "vehicles" and "vegetation", and the whole downstream graph is built around that choice.

    CategoryDOGMA/v56.7

    Inputs (1)

    NameTypeDefaultDescription
    planner_textSTRING

    Outputs (16)

    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