Nodes/DOGMA Nodes/DOGMA Semantic Tile Composer v16
ComfyUI Node

DOGMA Semantic Tile Composer v16

Five masks in, one noise mask and a prompt out — the template tile pass

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA Semantic Tile Composer v16
  • tile
  • sign_mask_tile
  • mask_tile_1
  • mask_tile_2
  • mask_tile_3
  • mask_tile_4
  • mask_tile_5
  • noise_mask
  • composite_mask
  • tile_prompt
  • info
category_1
category_2
category_3
category_4
category_5
restoration_brief
mask_threshold0.45
min_coverage0.0005
noise_grow14
composite_grow2
sign_protect_radius12

This is the old-school member of the DOGMA tile family: no VLM, no Qwen report, no prompt string to clean up. You feed it up to five category masks for one tile and it decides - deterministically, in code - what may be regenerated, what must be kept, and what the prompt should say.

What it decides

sign_mask_tile is the protected layer: thresholded, dilated by sign_protect_radius, and then subtracted from everything. Readable text and logos stay untouched no matter what the model feels like doing. The KB's own guidance on text is blunt about why - models rewrite glyphs into plausible-looking nonsense, and once a sign says a different word you can't un-see it.

Then each mask_tile_N / category_N pair is thresholded and measured. Two are dropped without asking:

  • Anything below min_coverage (0.0005) is noise, not a region.
  • Discrete-object categories - vehicles, people, animals, furniture, and the rest - covering more than 60% of the tile are treated as a detector failure and skipped, with [SKIPPED: implausibly broad] written into the report. That single check is the most useful thing in the node. A "cars" mask covering the whole frame is what turns a restoration into a repaint.

Whatever survives gets unioned into one base mask, and the node emits two versions of it: noise_mask, dilated by noise_grow (default 14) so the model has slack around the region, and composite_mask, grown by only composite_grow (default 2) so the paste-back stays tight. Both have the sign protection carved out.

Inputs and outputs

The required inputs are tile, sign_mask_tile, five mask_tile_N (IMAGE), five category_N (STRING, forced inputs so you can't type them by hand), restoration_brief, and the four knobs: mask_threshold (0.45), min_coverage, noise_grow, composite_grow, sign_protect_radius (12).

Outputs: noise_mask, composite_mask, tile_prompt, info. Wire noise_mask into your sampler's mask input, keep composite_mask for the stitch, and send tile_prompt to the positive conditioning text encoder. info prints the active categories, raw coverage, both mask coverages and the per-category percentages - it's the closest thing this pack has to a log, so read it when a tile comes back untouched.

The mask inputs are IMAGE, not MASK. That's not a typo in the schema; the helper converts from image luminance, which is how these suites pass masks around between stages.

Install

ComfyUI Manager → search DOGMA Nodes, or:

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

Restart. No pip dependencies (requirements.txt reads # No external dependencies.) and no model downloads - the "VLM" work that feeds this node happens in other packs. Note the repo README doesn't mention this node or its ~300 siblings at all; they're registered from dogma_semantic_v5641.py on import. That's why Google has nothing for you: the source is the documentation.

Where it bites

Category strings drive policy. They're matched by keyword into families, and none / empty means "skip this pair". Feed it free-form prose and it falls back to a generic policy - workable, but you lose the category-specific repair instructions that make this node better than a hand-drawn mask.

Thresholding SAM output at 0.45 is what creates or destroys your coverage figures. Soft masks that skirt the threshold produce coverage just under min_coverage and get silently skipped. If a tile that clearly has cars does nothing, that's the first place to look - and info will tell you the number.

It's a mid-suite node. There's a newer generation of composers in the same pack that parse a VLM inventory instead of taking five wired masks. If you don't already have a per-category mask graph - this is one half of a bigger pipeline, not a standalone detailer.

CategoryDOGMA/Semantic Detailer

Inputs (18)

NameTypeDefaultDescription
tileIMAGE
sign_mask_tileIMAGE
mask_tile_1IMAGE
category_1STRING
mask_tile_2IMAGE
category_2STRING
mask_tile_3IMAGE
category_3STRING
mask_tile_4IMAGE
category_4STRING
mask_tile_5IMAGE
category_5STRING
restoration_briefSTRING
mask_thresholdFLOAT0.450.05–0.95
min_coverageFLOAT0.00050–0.2
noise_growINT140–128
composite_growINT20–64
sign_protect_radiusINT120–128

Outputs (4)

NameTypeDescription
noise_maskMASK
composite_maskMASK
tile_promptSTRING
infoSTRING