DOGMA Tile Coherence Blend FAST v23.1
Keep the source's colour, keep the model's detail
- generated
- source
- image
- generation_weight
- info
What it is
The cleanup step after a generative upscale tile comes back. DOGMATileCoherenceBlendFastV231 takes the generated tile and the original source tile and fuses them by frequency: the source keeps the low-frequency information - colour cast, haze, exposure, broad lighting - and the generated image contributes detail where it actually added some.
If you've ever run a tiled upscale and watched the tiles drift in colour from each other, this is the node that stops it. Tile-to-tile colour drift is a low-frequency error, and low-frequency error is exactly what this node takes away from the generated tile.
It's the v23.1 fast path of the pack's v22 coherence lock. The docstring is explicit that the visual purpose is unchanged and the difference is analysis cost: "all analysis happens on a tiny proxy. Delta RGB + structure gate are packed together and upsampled to full resolution ONCE."
How it works
Everything important happens on a proxy roughly H/lowpass_divisor in size, floored at 96px - for a 1536px tile at divisor 24, that's a 96x96 analysis image.
- Downsample both images to the proxy with area averaging.
delta = source_proxy - generated_proxy. That's the low-frequency correction the source wants to contribute.- Build a structure gate on the proxy from local residual:
|source - local_mean|, normalized betweendetail_low(0.006) anddetail_high(0.035), max-pooled 3x3. Flat regions - sky, asphalt, fog - score near zero; architecture, foliage and vehicles score high. - Pack the three delta channels and the one gate channel into a single 4-channel tensor and do one full-resolution bilinear upsample. Then:
locked = generated + lowfreq_strength * correction, andalpha = flat_alpha + (1 - flat_alpha) * gate. - Edge handling: a smoothstep ramp over
edge_fadepixels from each tile border, floored atedge_floor.
Final composite is source * (1 - alpha) + locked * alpha. In a flat region, alpha collapses to flat_alpha (default 0.03), so the source wins almost completely - no invented clouds, no hallucinated noise floor. On textured detail, alpha goes to 1 and you keep the generated detail with the source's colour underneath.
Then the second output matters: generation_weight is that alpha as a MASK. Feed it into your stitch step as the blend mask and the paste-back inherits the same logic - no rectilinear seam where a tile boundary crosses flat sky.
Inputs and outputs
generated and source (the tiles, in matching order and size - source is resized to generated if needed, and expanded or truncated if the batch counts differ). Then the knobs: lowfreq_strength (0.92 - how much of the source's low-frequency correction to apply), lowpass_divisor (24 - the proxy scale), flat_alpha (0.03 - generated weight in flat areas), detail_low/detail_high (0.006/0.035 - the gate's thresholds), edge_fade (192px) and edge_floor (0.30).
Outputs: image, generation_weight (MASK) and info, which prints the proxy size, the strengths, and the mean generated weight. That mean is the number to watch: if it comes back near 0.03 across the board, your gate never fired and the node is doing nothing.
Install
ComfyUI Manager → DOGMA Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
# restart ComfyUI
Nothing outside PyTorch and ComfyUI - the repo's requirements.txt is a single comment line. No weights, no keys.
Gotchas
- You need the source tile at the same coordinates. This node aligns by size, not by metadata. If your pipeline hands it the wrong tile, you get a plausible-looking blur with no error.
edge_floorat 0.30 means tile borders keep noticeably more generated content than v22's default of 0.05. That's deliberate - it reduced the source-ghosting look at boundaries - but if you see a faint grid on flat areas, lower it.- Wrap it in the tile loop, not after stitching. The whole point is per-tile, and the docstring notes it runs under
torch.no_grad()for exactly that reason. - Zero reddit threads name this pack and its README covers the WAN VACE prep nodes and samplers, so there's no community baseline for these defaults. They come from one studio's production jobs.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| generated | IMAGE | — | |
| source | IMAGE | — | |
| lowfreq_strength | FLOAT | 0.920–1 | — |
| lowpass_divisor | INT | 248–64 | — |
| flat_alpha | FLOAT | 0.030–1 | — |
| detail_low | FLOAT | 0.0060–0.1 | — |
| detail_high | FLOAT | 0.0350.001–0.2 | — |
| edge_fade | INT | 1920–768 | — |
| edge_floor | FLOAT | 0.300–1 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| generation_weight | MASK | — |
| info | STRING | — |