Nodes/DOGMA Nodes/DOGMA v42 Target-First Local Prompt
ComfyUI Node

DOGMA v42 Target-First Local Prompt

One denoise number for a whole scene is how you wreck the sky

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA v42 Target-First Local Prompt
    • prompt
    • info
    • denoise
    category
    kind
    project_context
    base_denoise

    Here's a thing that took me longer to notice than I'd like to admit. A local repair pass runs at one denoise. Set it high enough to actually rebuild a mangled car and you also rebuild the sky, the road and the grass - regions that needed a light clean, got a full reinterpretation, and now have visible texture where the original had smooth gradient. That's the problem DOGMALocalPromptV42 solves, and it solves it with a multiplication.

    The mechanism: a per-category multiplier on your denoise

    You feed it base_denoise - your one global "how hard should local repair push" number - plus the usual category, kind and project_context. It clamps the base to 0.15–0.55, then scales it by a factor that depends on what's being repaired:

    • full strength (×1.0) for cars, buses, trucks
    • ×0.95 for people and animals
    • ×0.85–0.90 for buildings, furniture, machinery, products, clothing
    • ×0.62–0.75 for road and trees
    • ×0.55 for water and ×0.45 for sky

    Then it clamps the result to 0.15–0.55 and hands it out as the third output, denoise. That's the point: prompt and denoise leave together, so every group in your batch gets a prompt written for its subject and a strength matched to it.

    Concretely: set base 0.35 and a car gets 0.35 while the sky gets 0.16. Same graph, same knob, sensible per-region results. Instead of "the sky is now Swiss cheese", the sky gets a light pass that removes the AI blotching without inventing cumulus.

    The prompt side works like DOGMALocalPromptV40 - a canned paragraph per category, with a special-case body for sky, water, grass, trees and road that talks about boundaries, lighting and atmosphere rather than count and pose, and a generic body for everything else that hammers count, position, pose, scale, silhouette and colour. info reports the category and the denoise it chose.

    Wiring it

    base_denoise in (a FLOAT you wire from a primitive, so you can tune one number for the whole run), and out come prompt and denoise. Feed prompt to the local pass's text encode and denoise to whatever node takes that pass's strength - a KSampler's denoise input, or the equivalent in a custom-sampling graph.

    Why the numbers look like that

    The ordering isn't arbitrary. Objects have structure the model can rebuild - a car is made of panels, wheels and glass, and a denoise pass with a mask around them has something to hold onto. A sky is a gradient; there is no structure to rebuild, only a value. Push a real denoise at it and the model fills the emptiness with something, and "something" is always wrong. That's the same rule the inpainting side of the ecosystem has always followed (0.3–0.4 for a fix, lower when you want the source back), just applied per category instead of per image.

    Inputs you set

    Four required: category, kind (the OBJECT/STRUCTURE/SURFACE classification from your planner), project_context (a multiline sentence about the project, only its first ~180 characters get used in generic templates) and base_denoise. Outputs: prompt, info, denoise.

    Install

    ComfyUI Manager → DOGMA Nodes, or:

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

    Restart. The pack pulls in no Python dependencies at all - it's PyTorch and ComfyUI's own APIs - and downloads no models. Klein and your VLM are yours to supply.

    Where it bites

    The factors are tuned for a specific model family: a distilled Klein 9B at low steps and CFG 1. Run this table against a base (undistilled) model at higher CFG and 0.35 denoise does considerably more damage than it does on the distilled one. The version right after this one, v43, swaps the multiplier for fixed per-category values for exactly that reason.

    Also: the clamp means base_denoise can't save you from a bad idea. If you set 0.55, water still gets 0.30 - it's a scale, not a promise.

    And the usual string-input trap applies. kind is a plain STRING, not a dropdown. surface lowercase won't error, it'll just miss the special-cases and land in the generic branch.

    CategoryDOGMA/v42

    Inputs (4)

    NameTypeDefaultDescription
    categorySTRING
    kindSTRING
    project_contextSTRING
    base_denoiseFLOAT

    Outputs (3)

    NameTypeDescription
    promptSTRING
    infoSTRING
    denoiseFLOAT