Nodes/DOGMA Nodes/DOGMA Category Settings v21 — Macro Edit
ComfyUI Node

DOGMA Category Settings v21 — Macro Edit

V21 hands you the edit prompt and drops SAM from the job

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA Category Settings v21 — Macro Edit
    • group_radius
    • context_px
    • max_source_side
    • target_long_side
    • max_crops
    • stitch_strength
    • edit_prompt
    • summary
    category
    restoration_brief

    Version 21 is the odd one out among the settings nodes and the most interesting to read, because it changed what the output list is. v11-v13 gave you a detector threshold, a crop geometry and a blend alpha. v21 gives you group_radius, context_px, max_source_side, target_long_side, max_crops, stitch_strength, edit_prompt, summary - no sam_threshold, and two new inputs: category and restoration_brief.

    The missing threshold

    No sam_threshold output means this generation moved the detection problem elsewhere. The v21 family uses a segmenter driven by prompts and per-region grouping rather than by a confidence cut, and it pulls the broad-surface categories out of the local generative path entirely (the later plan nodes normalise road, sky, grass and water to __none__). If you're wiring v21 into a SAM node, you supply the threshold yourself.

    The edit_prompt output

    This is the feature. Feed it a category and your restoration_brief - a sentence or two describing the project - and it returns a ready-to-use repair prompt for that category, composed by the pack's own policy function. You can wire it straight into the conditioning of the local pass, which means the settings node and the prompt composer aren't separate concerns any more.

    It also means the prompt is being generated by the same family lookup that produced the numbers, so a vehicle row gets a vehicle-specific instruction ("keep the same visible vehicles, positions, directions, traffic density... correct malformed or fused geometry and clearly anachronistic vehicle designs") while the none row gets literally "Preserve the reference image unchanged."

    The numbers

    The v21 table is broader and more conservative on size than v13. Grouping radii are much larger - 900-1200 for architecture, road and sky, versus 820-960 in v13 - context sits at 160-208px for everything, and the model side is capped hard: summary states it as "Klein crop long side≤Npx (hard max <2000)", with values from 1536 (sky) to 1920 (architecture, vehicles, street objects, people). Blend alphas run higher than v13 across the board for objects (1.00 for vehicles and people, 0.95 for street objects and furniture) and lower for the big fields (0.55 sky, 0.68 road, 0.72 vegetation, 0.88 architecture).

    The vocabulary also widens: alongside the usual families you get machinery, clothing, food, product and furniture rows, which is a tell that this generation was aimed at product and interior work as well as street scenes. And group radius becomes a first-class knob rather than an internal detail - it's the first output, and the plan is clearly that you wire it into the region-grouping logic.

    Wiring

    One instance per sector: group_radius into grouping, context_px into the cropper, max_source_side/target_long_side into the resize, max_crops as the cap, stitch_strength into the blend, and edit_prompt into the text encoder for that sector's pass. summary echoes the family and the whole row - "architecture: region grouping=900px, context=192px, source advisory≤3800px, Klein crop long side≤1920px (hard max <2000), macro crops≤6, stitch alpha=0.88" - and it's worth watching, because this table has eighteen rows and mis-resolved families are the number one source of confusing results.

    Install

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

    Or Manager → DOGMA Nodes, then restart ComfyUI. No dependencies to install. The models are separate: a VLM for the plan, a segmenter, and a Flux-family edit model for the passes. GitHub README: doesn't document this node.

    Common issues

    edit_prompt runs long. These are 300-500 character instruction blocks by design; they're not meant to be rewritten by another LLM before reaching the encoder. Pass them through.

    A "hard max <2000" that your crop node ignores. The cap is the author's stated intent in the summary text, not a clamp - if your cropper is set to 3072 it will happily produce 3072, and you'll exceed whatever fits the model's trained resolution. Match the cropper to the row.

    Detection finding nothing. With no sam_threshold output, the usual cause is your segmenter's own default being far too strict for these prompts. This generation expects prompting-grade recall, not conservative confidence cuts.

    CategoryDOGMA/Semantic Detailer

    Inputs (2)

    NameTypeDefaultDescription
    categorySTRING
    restoration_briefSTRING

    Outputs (8)

    NameTypeDescription
    group_radiusINT
    context_pxINT
    max_source_sideINT
    target_long_sideINT
    max_cropsINT
    stitch_strengthFLOAT
    edit_promptSTRING
    summarySTRING