Nodes/DOGMA Nodes/DOGMA v35 Local Prompt — FIX FIRST
ComfyUI Node

DOGMA v35 Local Prompt — FIX FIRST

The shorter local prompt, and why shorter wins here

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA v35 Local Prompt — FIX FIRST
    • prompt
    • info
    category
    vlm_instruction

    DOGMALocalPromptV35 does what DOGMALocalPromptV34 does - turn a VLM's defect description into a front-loaded repair prompt - with every clamp turned one notch tighter. If you're running a distilled Klein at low step count, the tighter version is usually the better one.

    The mechanism, briefly

    Feed it category (from your planner: cars, people, sky) and the VLM's vlm_instruction. It:

    • strips a leading DEFECT: prefix, so it can control the first words itself
    • collapses whitespace and cuts the instruction at 120 characters
    • discards the instruction entirely if it smells like a destructive or text-rewriting verb - remove, delete, erase, add, create, invent, replace, rewrite, rename, respell
    • returns a bare PRESERVE CARS. when there's nothing safe to say
    • otherwise emits FIX CARS: <defect>. Preserve exact count, position, identity, orientation, occlusion and true focus. Change only the masked target; keep text/logos unchanged.

    Outputs are prompt and info. The info string tells you which of the two paths you got and how long the prompt came out.

    Why you'd choose this over v34

    Two reasons, both mechanical.

    First, length. v34 allows 150 characters of diagnosis and a 310-character total; v35 cuts the diagnosis at 120 and comes out with a shorter finished prompt. On a distilled model doing a handful of steps on a cropped region, every extra clause is a chance to be interpreted as "and also change this other thing". Short imperatives get followed; paragraphs get sampled.

    Second, the no-op is bare. v35's fallback is literally PRESERVE CARS. - nothing else. That's the cleanest possible input for the preserve gates downstream, because they key off the prompt starting with PRESERVE . Less to leak.

    Where v34 still wins: when you actually have a specific defect to name and want the model to reconstruct the masked object specifically. v34 spells that out; v35 assumes the mask already told it.

    Don't run both. They're alternatives on the same wire, and stacking them just means your VLM's sentence gets mangled twice.

    Inputs and outputs

    Two required inputs, and you should wire both rather than type them: category (a STRING, canonically the lowercase category name your planner emitted) and vlm_instruction (multiline STRING, the VLM's answer about this crop). prompt goes to the local pass's text encode; info is your sanity check.

    Install

    ComfyUI Manager → search DOGMA Nodes, or from a terminal:

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

    Restart, and the pack's nodes appear under DOGMA/… categories. There are no pip dependencies to worry about - the repo's requirements.txt contains nothing but a comment, which matches the code: it's PyTorch and ComfyUI's own APIs. You do need the models your graph uses: a FLUX.2 Klein checkpoint and a Qwen-VL to generate the instruction in the first place.

    Where it bites

    The blunt verb filter is the big one, same as v34. A VLM that says "fix the malformed sign by removing the duplicate lettering" gets thrown out completely - which is the correct outcome for a node that refuses to edit text, but surprising the first time your carefully worded instruction turns into a preserve.

    The 120-character cut is hard and silent. Ask your VLM for one short clause, not a paragraph.

    And remember what "preserve" means at this layer: the gates downstream will hand the unedited crop through when they see that prefix. So a VLM that's habitually pessimistic will quietly turn your local repair pass into a no-op across an entire batch. Watch the info output for a run - if every group says preserve, your VLM instruction is the problem, not the node.

    CategoryDOGMA/Semantic Detailer

    Inputs (2)

    NameTypeDefaultDescription
    categorySTRING
    vlm_instructionSTRING

    Outputs (2)

    NameTypeDescription
    promptSTRING
    infoSTRING