Nodes/DOGMA Nodes/DOGMA v52 Coarse-to-Objects Scene Plan
ComfyUI Node

DOGMA v52 Coarse-to-Objects Scene Plan

The node that picks which masks your SAM pass hunts for

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA v52 Coarse-to-Objects Scene Plan
    • preview
    • category_1
    • sam_prompt_1
    • kind_1
    • threshold_1
    • local_prompt_1
    • category_2
    • sam_prompt_2
    • kind_2
    • threshold_2
    • local_prompt_2
    • category_3
    • sam_prompt_3
    • kind_3
    • threshold_3
    • local_prompt_3
    • category_4
    • sam_prompt_4
    • kind_4
    • threshold_4
    • local_prompt_4
    • category_5
    • sam_prompt_5
    • kind_5
    • threshold_5
    • local_prompt_5
    • category_6
    • sam_prompt_6
    • kind_6
    • threshold_6
    • local_prompt_6
    inventory_text
    project_context

    Same shape as its v50 sibling - two strings in, thirty-one outputs out - but a different personality. Where the v50 planner is conservative about what it accepts as a category, this one is built to catch things, and it's opinionated about which six categories deserve your GPU time.

    The workflow it sits in the middle of: a VLM inventories the image, this node turns the inventory into six segmentation-and-refine jobs, a text-promptable segmenter makes the masks, and each mask gets a low-denoise pass with its own prompt. A distant row of cars isn't handled by one hand-drawn rectangle - it's handled by the sentence "cars and buses on a street", applied to whatever the segmenter finds.

    What comes out

    preview is a full dump of the six slots - read it before running anything expensive. Then, for each of six slots:

    category_i, sam_prompt_i (the phrase for your segmenter), kind_i (OBJECT / STRUCTURE / SURFACE), threshold_i (a float for the segmenter's detection threshold), and local_prompt_i (the refine prompt for that category).

    Inputs are inventory_text and project_context, both forceInput multiline strings, so both need a PrimitiveString upstream. inventory_text is the VLM's GROUP| lines - this node wants the three-field form the v52 instruction node asks for, and it ignores any fourth field entirely.

    The slot logic, which is the actual product

    _canon maps the VLM's wording onto twelve families, and two of them are deliberate mergers: every vehicle word lands in vehicles, every plant word lands in vegetation. Then the selection order kicks in. The coarse structural and surface families get first crack - buildings, vegetation, road, water, and the smaller object classes behind them. vehicles and people are appended next, and anything left over fills the gaps; unused slots pad out with none.

    That ordering is the "coarse-to-objects" in the display name: big stuff first, and the two families that matter most in a street scene get reserved seats instead of competing for the remainder. If your VLM returns eight families, you lose the tail - this is a fixed six-wide pipeline, not a dynamic one.

    Where the thresholds give the game away

    Compare them against the v50 plan node's table and you'll see the intent immediately:

    • vehicles 0.06, people 0.08
    • vegetation 0.12, buildings 0.14, road 0.14
    • water 0.16, animals 0.12, and the smaller object classes 0.16

    Those are low. Low thresholds mean the segmenter says yes more often - you get the half-occluded van and the car in the far distance, plus some junk. That trade is on purpose: this pipeline cleans up afterwards, because the de-overlap node carves objects out of surfaces. Recall first, tidy later. The v50 planner sits at 0.18–0.25 and is the pickier, more surgical version.

    The refine prompts are generative, and that's deliberate

    local_prompt_i isn't a gentle "refine this" string. For vehicles it reads along the lines of cars, buses, vans, trucks, motorcycles and bicycles on a busy street in Milan, Italy in the 1970s, period-correct vehicle design, believable wheels, windows, body proportions…. A code comment in the source says the quiet part: spatial preservation is supposed to come from the source latent, low denoise and a feathered mask - not from restrictive prose. So these prompts are written to generate, and the guardrails are elsewhere.

    Which gives you the rule for using this node: keep denoise low and the mask tight. Crank the denoise up and you've asked for "traffic spacing, natural overlaps and occlusions" over a region you just told the model to fill - and it will.

    One quirk worth knowing: the period phrase resolves to Milan, Italy in the 1970s if your project context mentions 1970, Milan, or Italy; otherwise your context is dropped in raw. With an empty context, the sentences end up with a dangling "in ." - ugly, mostly harmless to a prompt, and a sign you should set a context line.

    Unused slots are safe: they get nonexistent_placeholder_object_xyz, a threshold of 1.0, and the prompt "Preserve the reference image unchanged." Nothing to match, nothing to render. Just don't wire that mask anywhere.

    Install

    Manager → search DOGMA Nodes. Manual:

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

    Restart. No third-party dependencies at all - the pack's requirements.txt says so in a comment and pyproject.toml declares an empty dependency list. Node menu search: "scene plan", category DOGMA/v52.

    Where people get burned

    Nothing is typed into this node. Both inputs declare forceInput, so the text boxes are sockets. Drop a string primitive in and wire it, or right-click and use the usual widget-to-input conversion if your version offers it.

    The preview is blank. Your VLM didn't emit GROUP| lines, or you wired a caption into inventory_text. This node only reads lines that start with GROUP|; everything else is discarded silently.

    The local prompts look generic. That's the fallback path - your GROUP lines had no prompt field, or the category didn't map.

    You searched for v52 and found nothing. Try "scene plan", category DOGMA/v52. The pack's README covers only its WAN VACE nodes and samplers; this whole semantic-detailer family is readable solely in the source.

    CategoryDOGMA/v52

    Inputs (2)

    NameTypeDefaultDescription
    inventory_textSTRING
    project_contextSTRING

    Outputs (31)

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