Nodes/DOGMA Nodes/DOGMA v38 Scene Inventory Plan
ComfyUI Node

DOGMA v38 Scene Inventory Plan

The strict parser for your VLM's GROUP lines

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA v38 Scene Inventory Plan
    • category_1
    • sam_prompt_1
    • category_2
    • sam_prompt_2
    • category_3
    • sam_prompt_3
    • category_4
    • sam_prompt_4
    • category_5
    • sam_prompt_5
    • category_6
    • sam_prompt_6
    • summary
    inventory_text

    The first version in the pack's planner family, and the least forgiving. You give it a VLM's inventory text; it hands back twelve strings - a category and a segmentation prompt for each of six slots - plus a human-readable summary.

    The format it wants

    One group per line, four pipe-separated fields, the first being the literal word GROUP. Field two is the category, field three is the segmentation prompt, field four is the kind:

    GROUP|cars|car, automobile, sedan|OBJECT
    GROUP|buildings|building, facade, balcony|STRUCTURE
    

    The parser (shared with DOGMASceneInventoryKindsV38) keeps only lines starting with GROUP|, requires at least four fields, lowercases the category, uppercases the kind and coerces anything not OBJECT/STRUCTURE/SURFACE to OBJECT.

    Word of warning on the field order, because this will bite you: the pack's newer instruction builder (DOGMAV50SceneInstruction) asks your VLM for GROUP|category|kind|prompt - kind third. Feed that output to this node and your sam_prompt_N outputs come out as the literal string OBJECT. Check your first parsed row against the raw VLM text before you run anything.

    Then it applies the house filters, and they're the reason this node is pleasant rather than fiddly:

    • duplicate categories are ignored, first wins;
    • anything containing text, logo, sign, license, brand or advert is dropped - signage is never an editable target, because a generative pass will hallucinate lettering;
    • anything containing broken, damaged, malformed, wrong, missing, blur or blurry is dropped too, so you can't accidentally make "damaged facade" a category;
    • an empty prompt field falls back to the category name;
    • six rows max, and unused slots are padded with none + the concept nonexistent_placeholder_object_xyz:1, which no segmenter will match. Empty slots stay empty instead of matching the whole frame.

    Inputs and outputs

    inventory_text in - one input, multiline, nothing else to set. Out: category_1, sam_prompt_1category_6, sam_prompt_6, and a summary string listing what it decided, e.g. 1. cars [OBJECT] - SAM: car, automobile, sedan, hatchback, station wagon.

    Wire each pair into your segmenter: the category is your label for the slot (it labels crops, gets echoed in stitch info, and keeps your graph legible), the prompt goes to the segmentation node. The summary is for you - it's the only place to see the whole plan without opening five preview nodes.

    Note that this version emits no kind outputs and no thresholds; the kind is parsed but only used in the summary, and the segmentation prompt is used verbatim from the VLM's line. That's what changed in v39 onward: kinds and confidence thresholds became first-class outputs. If your VLM writes good prompts and you want it in charge, use v38. If you want the pack's own calibrated prompts and thresholds, jump to v40+.

    Install

    Manager → search DOGMA Nodes → install → restart:

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

    Nothing installs beyond the pack - no Python dependencies (requirements.txt: "No external dependencies"), no model files. It's a text node; the models that make it useful are a VLM to write the inventory and a segmenter to consume the prompts. Registered under DOGMA/Semantic Detailer.

    The pack comes from axior, the studio side of a Milan production team doing commercial AI work with heavy ComfyUI inpainting. A schema this rigid is a production artifact: when your job is six masked passes per shot, "ask the VLM nicely and hope" is not a workflow.

    Troubleshooting

    All six slots none. No line in your text started with GROUP|. The parser strips markdown fences but not conversational framing, so "Here are the groups I found:" won't parse - and neither will a code block whose content your VLM wrapped differently. The pack's own instruction builders (DOGMAV50SceneInstruction, DOGMAV52SceneInstruction) exist to nail this down; copy their wording into your VLM prompt.

    Fewer than six groups. The VLM only reported what it saw. DOGMASceneInventoryPlanV42 and V43 add fallback categories derived from project context for exactly this case; v44 goes the other way and refuses to invent anything. Pick your ideology.

    A category you can see in the text is missing. Check the drop list - if your VLM wrote "shop sign", it was filtered out on purpose.

    The prompt is a whole sentence. The pack's later versions canonicalise categories and substitute their own curated prompt lists (carscar, automobile, sedan, hatchback, station wagon). Here it's the VLM's words, for better and worse.

    CategoryDOGMA/Semantic Detailer

    Inputs (1)

    NameTypeDefaultDescription
    inventory_textSTRING

    Outputs (13)

    NameTypeDescription
    category_1STRING
    sam_prompt_1STRING
    category_2STRING
    sam_prompt_2STRING
    category_3STRING
    sam_prompt_3STRING
    category_4STRING
    sam_prompt_4STRING
    category_5STRING
    sam_prompt_5STRING
    category_6STRING
    sam_prompt_6STRING
    summarySTRING