Nodes/DOGMA Nodes/DOGMA Tile Coherence Blend v22 — Low-Frequency Lock
ComfyUI Node

DOGMA Tile Coherence Blend v22 — Low-Frequency Lock

The slow one that v23.1 replaced — and when it's still right

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA Tile Coherence Blend v22 — Low-Frequency Lock
  • generated
  • source
  • image
  • generation_weight
  • info
lowfreq_strength0.92
lowpass_divisor24
flat_alpha0.08
detail_low0.006
detail_high0.035
edge_fade256
edge_floor0.05

What it is

The original low-frequency lock. DOGMATileCoherenceBlendV22 merges a generated tile with its source tile so that source colour, haze and exposure survive while generated detail is kept where the source actually has structure. Its own docstring names the target: "suppress generative drift in flat regions / tile borders, while keeping generated high-frequency detail where the source actually contains structure."

The pack later shipped DOGMATileCoherenceBlendFastV231, which is the same idea with all the analysis moved to a tiny proxy. The fast version's docstring is refreshingly blunt about why: the old node did "multiple full-resolution bicubic/antialiased resizes and 31x31 full-resolution pooling passes." On a 3000px tile inside a multi-tile loop, that's real time.

So why is this file still here, and why would you use it? Because the v22 gate is computed on a different signal. v23.1 measures structure with a 3x3 local mean on a 96px proxy. v22 measures it on the source at 1/8 resolution, then does a 31x31 max-pool followed by a 31x31 average-pool at full resolution - a morphological open-then-close, which fills and erodes the gate so that isolated high-detail pixels don't punch isolated holes in the blend. That gives a smoother, better-behaved gate at the cost of the compute. On a single hero plate, or on a tile size where you can afford it, you can reasonably prefer v22's gate. On a 40-tile sweep, you can't.

How it works

Full-resolution, band-split:

  1. Low-pass both images: area-downsample to H/divisor, then bicubic with antialias back up. Get gl (generated low) and sl (source low).
  2. locked = generated + lowfreq_strength * (sl - gl). At 0.92 the source's low-frequency field largely overwrites the generated one.
  3. Build the gate from |source - lowpass(source at H/8)| - high-frequency magnitude in the source - normalized between detail_low and detail_high.
  4. Open and close that gate with 31x31 pooling.
  5. alpha = flat_alpha + (1 - flat_alpha) * gate, then a smoothstep edge ramp floored at edge_floor.
  6. Composite source * (1 - alpha) + locked * alpha.

Defaults differ from v23.1 in ways that change the look: flat_alpha 0.08 vs 0.03 (flat regions accept more generated content here), edge_fade 256 vs 192, and edge_floor 0.05 vs 0.30 (borders here are almost pure source, which kills visible steps but can ghost).

Inputs and outputs

generated, source, and the eight controls: lowfreq_strength (0.92), lowpass_divisor (24), flat_alpha (0.08), detail_low (0.006), detail_high (0.035), edge_fade (256), edge_floor (0.05). Source is resized to generated if the sizes disagree, repeated if it's a single image against a batch, and truncated if it's longer.

Outputs: image (the fused tile), generation_weight (MASK - the alpha, ready to be the blend mask at stitch time) and info (the settings plus the mean generated weight). Same triple as the fast version, which is the point: swapping between them is a drop-in.

Install

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

ComfyUI Manager → DOGMA Nodes works as well. Restart, then find it under DOGMA/Semantic Detailer. No dependencies (requirements.txt is a comment), no model files, no accounts.

Gotchas

  • It's slow on big tiles, and it's slow per tile. If your workflow got noticeably faster after switching to v23.1, you didn't imagine it.
  • Both nodes need the source tile that corresponds to the generated tile. They match by size and order, not by any identifier, so a shuffled list composites confidently into the wrong place.
  • If generation_weight comes back uniformly tiny, your gate never fired - usually because detail_low/detail_high don't suit the tile's actual detail scale. Read the mean in the info string before you blame the model.
  • The pack has no community coverage at all: zero reddit threads name it, and the README covers the WAN VACE prep nodes and the DOGMA samplers rather than this half. These defaults are from one studio's jobs, not from consensus.
CategoryDOGMA/Semantic Detailer

Inputs (9)

NameTypeDefaultDescription
generatedIMAGE
sourceIMAGE
lowfreq_strengthFLOAT0.920–1
lowpass_divisorINT248–64
flat_alphaFLOAT0.080–1
detail_lowFLOAT0.0060–0.1
detail_highFLOAT0.0350.001–0.2
edge_fadeINT2560–768
edge_floorFLOAT0.050–1

Outputs (3)

NameTypeDescription
imageIMAGE
generation_weightMASK
infoSTRING