Nodes/DOGMA Nodes/DOGMA v39 Adaptive Prompt
ComfyUI Node

DOGMA v39 Adaptive Prompt

Period lock, kind awareness, and one line that says 'do nothing'

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA v39 Adaptive Prompt
    • prompt
    • info
    category
    kind
    project_context

    DOGMAAdaptivePromptV39 is the v39 generation's prompt composer, and the difference from its v38 sibling is one input: project_context. Where v38 wrote a kind-aware repair prompt and stopped, v39 appends your project description as a hard constraint on how the existing objects should look.

    The three inputs, and why the third one matters

    category and kind work exactly as they do across this generation - category is the thing being repaired, kind is OBJECT, STRUCTURE or SURFACE, and the body of the prompt changes accordingly. OBJECT gets count/identity/position/scale/orientation/silhouette/colour/pose/occlusion. STRUCTURE gets identity, placement, proportions, perspective, materials, plus "improve existing structural edges/repetition only; never redesign". SURFACE gets footprint, boundaries, colour, lighting, density, wear and large-scale structure.

    project_context is trimmed to 700 characters and spliced in as PROJECT/PERIOD LOCK: <your text>, followed by one sentence that is doing a lot of work: "Do not add, remove, replace or modernize anything." That sentence is the whole reason to prefer v39 over v38 in a restoration graph. Give a VLM or an edit model a project description - "Milan, 1975", "rural Norway, 1930s" - and its first instinct is to make the scene look more like the description: modernise a car, add period clothing, plant a tree that fits. The lock phrase narrows that to a plausibility constraint on objects that are already visible.

    Feed category="none" and you get "PRESERVE IMAGE." - a valid prompt that keeps the branch alive and changes nothing.

    Wiring

    Planner → this node (per sector) → text encoder → per-crop Klein masked inpaint. The prompt output goes into the positive conditioning; the info output is a one-line confirmation ("v39 object detail donor prompt: cars") that's worth watching, because in this family of workflows the most common silent failure is a sector that looks wired but is actually composing a no-op prompt. It pairs naturally with DOGMAAdaptiveCropsV39 for geometry and DOGMAAdaptiveSettingsV39 for the strengths, all three keyed off the same category/kind pair.

    Install

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

    Or Manager → search DOGMA Nodes, then restart ComfyUI. The pack ships zero Python dependencies (its requirements file literally contains only a comment saying so), which is a pleasant outlier in a custom-node ecosystem where half the support threads are dependency conflicts. What it does assume is a toolkit around it: a Qwen3-VL-class VLM producing the plan text, a grounded segmenter producing the masks, and FLUX.2 Klein doing the local passes. Note the GitHub README is stale and doesn't document the v39 family at all - it still only describes the WAN VACE prep and sampler nodes, so don't judge the pack by its landing page.

    Common issues

    Project context bleeding into generation. A 700-character context is a lot of surface for an edit model to grab onto, and "period look" is always a temptation. Shorten it to the essentials - place, decade, one or two defining constraints. Vague context is worse than none: it invites invention.

    Nothing changes in the crop. If the region was already sharp and coherent, that's the correct outcome. Second passes over good regions cost time and introduce drift risk; this whole pipeline is for the small broken parts of an otherwise good render.

    The same prompt for every sector. You've fanned one composer across the graph instead of one per category. Each sector needs its own category/kind pair, otherwise every crop is told it's repairing whatever the first one was.

    Prompt too long for a tight encoder budget. These prompts are 400-600 characters of instructions. If you're chaining an LLM rewriter after this node, don't - you'll get the instructions summarised into mush.

    CategoryDOGMA/v39

    Inputs (3)

    NameTypeDefaultDescription
    categorySTRING
    kindSTRING
    project_contextSTRING

    Outputs (2)

    NameTypeDescription
    promptSTRING
    infoSTRING