Nodes/DOGMA Nodes/DOGMA Local Prompt v26 — Safe Sector Instruction
ComfyUI Node

DOGMA Local Prompt v26 — Safe Sector Instruction

DOGMA Local Prompt v26

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA Local Prompt v26 — Safe Sector Instruction
    • prompt
    • info
    category
    vlm_instruction

    If you ask a vision language model to "describe what's wrong with this crop so it can be repaired," a decent fraction of the time it will suggest removing something. A lamp post. A person standing in the road. The bin. And if that text goes into your re-render prompt unfiltered, the model will happily do it - you asked for it in writing.

    This node is the airlock between the language model and the pixel model, and its mechanism is a regex of verbs you're not allowed to use.

    What it is

    The v26 line is where the pack started asking a VLM for per-region repair instructions rather than using fixed category prompts. That's a real capability gain and it introduces a real hazard: the language model authors your prompt, so the language model can author things you didn't intend.

    DOGMALocalPromptV26 takes the category and the raw VLM instruction, cleans it, strips the sentences that say anything destructive, and appends a category-specific preservation clause. The docstring states the rule as policy rather than preference: "never let a VLM-generated local prompt authorize destructive cleanup."

    How it works

    Cleaning is unglamorous and necessary: markdown code fences are stripped (models love wrapping answers in them), all whitespace is collapsed, and anything past 1100 characters is cut at a word boundary - because the downstream model has no use for a paragraph and the token budget belongs to the image.

    The filter is the interesting part. The instruction is split into sentences, and each sentence is tested against a destructive-verb pattern: remove, delete, erase, eliminate, discard, take away, replace all people, remove people, remove vehicles. Matching sentences are dropped whole; the survivors are rejoined. Then a hard cap: if nothing survives - which happens, because sometimes the entire VLM answer is one suggestion to delete something - the node substitutes a safe default, telling the model to refine the masked category with coherent geometry and natural detail while preserving every instance, position, scale, colour, pose and occlusion in the current master.

    Then it appends the lock, and the lock depends on the category. signage gets sign count, frame, location, size and perspective pinned, with changes restricted to inside existing sign faces. people gets every visible person kept at the same position, scale and pose, and explicitly separated from railings, vehicles, poles and architecture - that last clause is aimed at the classic fusion artifact where a person's arm merges into a fence. vehicles keeps count, position, direction, scale and approximate colour. Anything else gets a generic "keep the number and placement of instances unchanged, maintain lighting, colour, geometry."

    Output is the concatenated prompt plus a receipt.

    Inputs and outputs

    Two inputs, both forced STRING inputs so they arrive on wires rather than being typed: category (from your plan or inventory node) and vlm_instruction (the multiline report from the vision model, or from a barrier node that batches several).

    Two outputs. prompt (STRING) - cleaned instruction plus lock; this goes to your conditioning. info (STRING) - a sentence reporting the category, the prompt length in characters, and that destructive VLM sentences were filtered. That "filtered" note is worth reading when a result is puzzlingly timid: it tells you the model asked for something and the node said no.

    Install

    ComfyUI Manager → search DOGMA Nodes (publisher axior), install, restart. Manual:

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

    No dependencies, no weights - the requirements.txt is a single line saying there are none. The VLM that produces vlm_instruction is a separate install (Qwen3-VL in the reference workflow), and its download dwarfs everything this pack adds.

    Common issues

    Be clear about the shape of the guarantee. Sentence-level filtering is coarse: it drops a whole sentence if it contains a banned verb, so "remove the blur from this window" gets deleted along with "remove the lamp post." That's the correct bias - false negatives are recoverable, false positives are not - but it's why some legitimately useful instructions vanish. The receipt in info is how you find out.

    There's also a whitelist problem hiding in the design: the filter knows a fixed list of destructive verbs. A cleverly-phrased VLM suggestion that avoids every one of them - "clear the sidewalk of clutter" - sails through. v26.1 widens the net considerably, adding rewrite/rename/respell/invent/substitute, driven by the pack's other obsession: keeping text from being re-lettered. If your pipeline touches signage at all, that's the one you want.

    CategoryDOGMA/Semantic Detailer

    Inputs (2)

    NameTypeDefaultDescription
    categorySTRING
    vlm_instructionSTRING

    Outputs (2)

    NameTypeDescription
    promptSTRING
    infoSTRING