DOGMA Active Local Prompt v31 — No Per-Object VLM
DOGMA's v31 local prompt builder
- prompt
- info
If you've built a detailer pass with a local VLM in the loop, you already know where the money goes: asking a vision model "what's wrong with this crop?" once per crop. Ten cars, ten VLM calls, and the answers start contradicting each other. DOGMAActiveLocalPromptV31 is the escape hatch - it writes one repair prompt per category, using defect hints a single full-frame audit already produced, and lets Klein look at each crop itself.
What it does
Three inputs: category, audit_hints, restoration_brief. Two outputs: prompt and info. No image inputs at all - this is a text composer, and it sits between your planner/audit node and the Klein pass.
The category string gets lowercased and matched against a small set of families, and each one gets its own aggressively specific paragraph. vehicles gets "fused neighboring cars, impossible body panels, malformed wheels/tires, broken windows, trim, rooflines" plus an instruction to separate touching vehicles cleanly while keeping each footprint, direction and approximate colour. people gets fused bodies, melted silhouettes, duplicated anatomy, bodies merged into railings and vehicles. architectural details gets warped/duplicated windows and broken balcony geometry. faces, hands, street furniture all get their own. Anything else falls through to a generic "repair the existing masked target object(s)".
Then it bolts on three things that matter more than the specifics:
- a second-pass framing - "This is not a generic upscale/sharpen pass", which is exactly the right thing to say to an edit model that will otherwise happily turn your detail pass into a re-render;
- a text lock - every glyph, sign and license plate is fixed identity; unreadable stays unreadable;
- a hint clause - your
audit_hintsget injected as "possible defects... apply a listed defect only if it is actually visible in THIS crop; otherwise ignore it." That's the mechanism that replaces per-crop VLM calls with one full-frame pass.
The gotcha worth knowing before you ship
The code hardcodes its plausibility constraint: "Use Milan, Italy, 1970s only as a plausibility constraint". This pack was built for a specific archival-restoration project and that sentence shipped. If your project is a 2020s wedding photo, you're feeding Klein a period lock you didn't ask for. It's phrased as "do not change identity to make it more period-like", so it mostly behaves, but it's a real tell that this is one person's working tool rather than a generic library. Patch it out if your restoration isn't post-war Italian.
The info output also documents the author's intended recipe - "Base9B 20-step CFG4 denoise 0.35". That's consistent with FLUX.2 Klein base 9B being guidance-distilled but not step-distilled: ~20-50 steps at CFG 4-5, where the distilled 4-step variant runs CFG 1. If you're running the distilled model instead, don't copy those numbers.
Wiring it
audit_hints_2/_3/_4 and the matching category_2/_3/_4 outputs from DOGMAAuditSectorPlanV31 are the intended feed; restoration_brief is your project description. Wire prompt into the conditioning of the per-crop Klein pass, one branch per sector, after DOGMAAdaptiveCropsV39 or your own cropper. If you have nothing to hint with, leave audit_hints blank - the composer just drops the clause and you get the family-specific prompt alone.
Install
Manager → search DOGMA Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
Restart ComfyUI. requirements.txt is one comment line - "No external dependencies" - and pyproject.toml lists dependencies = [], so there's no pip step and nothing to conflict. What you need instead: a Qwen3-VL-class VLM for the audit text, a grounded segmenter for masks, and FLUX.2 Klein 9B for the re-render (~16-20 GB at fp8). Note the GitHub README is stale - it doesn't document this node or the v31-v40 family at all.
Common issues
Prompts that read beautifully and change nothing. That means your masks are wrong, not your prompt. This node has no opinion about masks; it assumes the sector masks from DOGMAAuditSectorPlanV31 are already tight on real defects.
A stale hint applied to the wrong crop. The hint clause says "apply only if visible here", but a 4B VLM audit is not a reliable localiser. Hints are a nudge, not a spec. If a crop gets worse after you add hints, that's your signal.
Your crop list is empty and nothing runs. Upstream nodes in this family return a small safe no-op crop rather than an empty list; if you cut the wiring and lose that, the downstream Klein branch just doesn't execute and you'll think the prompt node is broken.
Period drift you didn't ask for. See the hardcoded Milan line above.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| category | STRING | — | |
| audit_hints | STRING | — | |
| restoration_brief | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| info | STRING | — |