Nodes/DOGMA Nodes/DOGMA Scene Plan → 6 Slots
ComfyUI Node

DOGMA Scene Plan → 6 Slots

The planner that reserves a slot to protect your signage

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA Scene Plan → 6 Slots
    • plan_preview
    • category_1
    • sam_prompt_1
    • edit_prompt_1
    • category_2
    • sam_prompt_2
    • edit_prompt_2
    • category_3
    • sam_prompt_3
    • edit_prompt_3
    • category_4
    • sam_prompt_4
    • edit_prompt_4
    • category_5
    • sam_prompt_5
    • edit_prompt_5
    • category_6
    • sam_prompt_6
    • edit_prompt_6
    planner_text
    global_targetMilan, Italy, 1972–1978. Preserve the source composition, object count, positions, camera, lighting and photographic character.

    Most of this pack's planners take an inventory of the scene and turn it into six slots. This one is the eldest and the most opinionated, and it makes a decision the others don't: slot one is always signage, always marked PROTECT ONLY, always given no editing instruction at all.

    Why that's the interesting part

    Generative repair can't read. Ask a model to clean up lettering and it will produce plausible-looking letters that spell nothing - the single most obvious tell in a restored or upscaled photo, and a lawsuit-grade error if the sign belongs to a real business.

    So Scene Plan → 6 Slots hard-codes the answer. The first slot is assigned the category signage, gets a segmentation prompt covering text signs, billboards, rooftop signs, building signs, shop signs and traffic signs, and gets this as its edit instruction:

    PRESERVE EXACT SOURCE PIXELS. Signage is protected from generative editing because exact wording must not be hallucinated.

    The slot exists to make an unwanted edit impossible. On an image with no text the signage mask is simply empty; the row costs you one wasted segmentation pass and buys guaranteed protection everywhere else.

    The rest of the plan

    You feed it planner_text - a VLM's category list, one per line, comma-separated or not - and it deduplicates, classifies each entry into a family, and sorts. The rule that shapes everything: broad surfaces are excluded from local slots. Architecture, vegetation, road, sky, water - those get "Handled by the GLOBAL BASE restoration pass. Local generative edit disabled." A wall doesn't need a per-object crop pass, and spending a slot on one wastes VRAM.

    What's left is sorted by priority into the five remaining slots: street objects, people in traffic lanes, animals, vehicles, people, then anything unclassified. Each gets a SAM prompt and a KLEIN edit instruction written in the pack's preservation voice - preserve count, positions, individual colours; repair malformed geometry; do not add vehicles; do not standardise all cars to one colour. The most telling category is people-in-traffic-lanes: remove only the pedestrians standing in active lanes, reconstruct the road, spare anyone on a sidewalk.

    Inputs and outputs

    planner_text (multiline STRING, required, typically wired) and global_target - a multiline string with a default that reads Milan, Italy, 1972–1978. Preserve the source composition, object count, positions, camera, lighting and photographic character. That default is a genuine fingerprint: this pipeline was built for a period-city restoration project, and the target string is substituted into every edit instruction.

    Outputs are plan_preview plus six repeats of category_N, sam_prompt_N, edit_prompt_N - nineteen strings. plan_preview is worth wiring to a preview or show-text node: it prints the slot number, its role (PROTECT ONLY / LOCAL REPAIR / GLOBAL-NO-OP), the family, and both prompts, which is the fastest way to understand what the planner decided.

    Install

    Manager → search DOGMA Nodes → install → restart. Or:

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

    No dependencies and no model downloads - this is text logic over ComfyUI's node API, and the pack's requirements.txt declares nothing. It lives in DOGMA/Semantic Detailer.

    Worth knowing if you go looking for source: this class is patched at the bottom of the pack's Python file by several later policy revisions, ending with a v14 policy that adds the reserved signage slot and the surface exclusion. The info_schema you see in ComfyUI is the base one; the behaviour you get is the latest patch.

    The pack is by axior, the studio side of a Milan production team whose commercial work runs through hundreds of ComfyUI inpaints per job. Protecting signage, keeping vehicle counts exact, and refusing to standardise a fleet to one colour are all things you learn to encode when a client reviews the frame.

    Two things to watch

    The Sam prompt notation is archaic. This generation of node writes prompts like car:180,bus:15,building:100 - concept plus an inline number - whereas v40 and later emit plain concept lists with the confidence threshold as a separate FLOAT output. If your segmenter reads plain phrases, the trailing numbers may end up as part of the concept string. Check one mask before trusting the whole plan.

    Slots 2–6 can all be __none__. That's the design when the inventory has nothing to repair locally. If your graph then runs six empty passes, it isn't broken - it's the plan saying "leave this image alone", which is a legitimate answer.

    CategoryDOGMA/Semantic Detailer

    Inputs (2)

    NameTypeDefaultDescription
    planner_textSTRING
    global_targetSTRINGMilan, Italy, 1972–1978. Preserve the source composition, object count, positions, camera, lighting and photographic character.

    Outputs (19)

    NameTypeDescription
    plan_previewSTRING
    category_1STRING
    sam_prompt_1STRING
    edit_prompt_1STRING
    category_2STRING
    sam_prompt_2STRING
    edit_prompt_2STRING
    category_3STRING
    sam_prompt_3STRING
    edit_prompt_3STRING
    category_4STRING
    sam_prompt_4STRING
    edit_prompt_4STRING
    category_5STRING
    sam_prompt_5STRING
    edit_prompt_5STRING
    category_6STRING
    sam_prompt_6STRING
    edit_prompt_6STRING