Nodes/DOGMA Nodes/DOGMA v39 Adaptive Settings
ComfyUI Node

DOGMA v39 Adaptive Settings

One node, eight numbers, different tuning for cars, facades and asphalt

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA v39 Adaptive Settings
    • max_groups
    • context_px
    • target_long_side
    • mid_strength
    • detail_strength
    • drift_start
    • drift_end
    • info
    category
    kind

    This is the least glamorous node in the v39 family and the one that decides whether your render improves or drifts. DOGMAAdaptiveSettingsV39 takes two strings - category and kind - and returns eight values that the rest of the v39 pipeline consumes: max_groups, context_px, target_long_side, mid_strength, detail_strength, drift_start, drift_end, plus an info line.

    There's nothing hidden: the numbers you get depend only on the kind, with category="none" short-circuiting the whole thing.

    The table, and what each column is for

    • none → 1 group, 64px context, 768 target, all strengths zero, drift band 0.03-0.09. An inactive sector that still executes, preserving the image.
    • SURFACE → 6 groups, 160px context, 2048 target, mid 0.12, detail 0.62, drift 0.025-0.085.
    • STRUCTURE → 6 groups, 208px context, 2048 target, mid 0.22, detail 0.78, drift 0.030-0.095.
    • OBJECT (and anything unrecognised) → 8 groups, 176px context, 2048 target, mid 0.28, detail 0.88, drift 0.035-0.105.

    Read the shape rather than the numbers and it's obvious what the author was thinking. The more identifiable the thing, the harder it's allowed to be touched: an object gets the highest mid and detail strength because a car either has four wheels or it doesn't; asphalt gets the lowest because nobody can tell a repaired road from an untouched one, and there's far more of it to get wrong.

    context_px follows the same logic inverted - 208px for structures because a facade edge is meaningless without its surroundings, 160px for a surface, 176px for an object.

    mid/detail and the drift band

    mid_strength and detail_strength are the knobs on the pack's detail-injection compositor (DOGMAGlobalTileDetailInjectV39 and friends), which is not plain inpaint - it reconstructs the image from a low-pass base plus source mid-frequency and generated high-frequency, weighted by a support map. mid_strength is how much structure the generated tile is allowed to contribute; detail_strength is how much fine texture. That separation is why a surface can take mid 0.12 / detail 0.62 without becoming a new road.

    drift_start and drift_end define the abandonment band. The compositor measures large-scale colour/brightness drift between source and generated; drift above the band means "the model went somewhere else, do not import its structure". OBJECT is allowed the widest band (0.035-0.105) because it's the thing most likely to legitimately change. Narrow band = conservative = you asked for it.

    Wiring

    Fan it out alongside the crop node: max_groups, context_px, target_long_side into DOGMAAdaptiveCropsV39, and mid_strength/detail_strength/drift_start/drift_end into the v39 detail-band stitch that composites the result. Read info when you're debugging - it echoes the category, kind and the final target size, which is the fastest way to catch a sector that arrived with the wrong kind.

    Install

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

    Or Manager → DOGMA Nodes and restart. Zero dependencies, no models shipped - you provide the segmenter, the VLM and FLUX.2 Klein. The GitHub README documents neither this node nor the v39 family; the source is the documentation here.

    Common issues

    Every sector behaves the same. Almost always an unrecognised kind, which silently lands on the OBJECT row. Kinds must be exactly OBJECT, STRUCTURE or SURFACE.

    Facades drifting into modern buildings. STRUCTURE already has the second-lowest mid/detail of the three. If it's still happening, the prompt is the problem, not these numbers - check that your prompt composer is saying "never redesign".

    You wanted per-scene control. This node is deliberately table-driven. If you need a real dial, bypass it and feed the compositor's inputs from primitive nodes instead; that's what they're there for.

    CategoryDOGMA/v39

    Inputs (2)

    NameTypeDefaultDescription
    categorySTRING
    kindSTRING

    Outputs (8)

    NameTypeDescription
    max_groupsINT
    context_pxINT
    target_long_sideINT
    mid_strengthFLOAT
    detail_strengthFLOAT
    drift_startFLOAT
    drift_endFLOAT
    infoSTRING