Nodes/DOGMA Nodes/DOGMA v35.1 Aligned 2x2 Noise
ComfyUI Node

DOGMA v35.1 Aligned 2x2 Noise

Check four tiles before you commit to the whole grid

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA v35.1 Aligned 2x2 Noise
  • test_data
  • noise
  • info
seed1976

Tiled sampling is expensive, which makes tiled sampling debugging unpleasant. A 3x3 grid on a 2x upscale is nine model calls per attempt, and if the seam behaviour is wrong you find out nine calls later. DOGMAAlignedTestTileNoiseV351 is the cheap probe: it builds the same global noise field as the production node, but for a 2x2 block selected out of your grid, so you can verify the alignment story in four samples.

Inputs and outputs

test_data comes from DOGMASelect2x2TestTilesV351 - a DOGMA_TEST_DATA record containing the four tile coordinates, the block's row/column position in the grid, the overlap and stride, and the bounding patch. seed (default 1976) is the noise seed. Outputs are noise (a list of four NOISE objects, one per tile) and info, which prints the seed and "4 tiles".

How the noise works, because this is the whole point

The mechanism is identical to DOGMAAlignedTileNoiseV35 and worth restating: instead of each tile getting its own independent random tensor, one global noise field is generated on the CPU at the global latent resolution (working_width / 16 by working_height / 16), cached per channel count, and each tile simply crops that field at its own global latent coordinate. Same seed, same field, and a tile at origin (768, 0) gets exactly the slice of noise that belongs there - so the overlapping regions of neighbouring tiles see the same noise, not two unrelated draws.

That is how you get a coherent global image out of partitioned sampling. Two tiles sampling unrelated noise into a shared overlap is where the visible grid comes from, and it's invisible in any single tile preview.

The 16 in that division is the Flux-family VAE scale factor. It's also why your tile geometry came from DOGMAAlignedDacPrepareV35 with everything snapped to multiples of 16 - field cropping only lines up if both the field and the tile origins are on the same grid.

The test workflow

DOGMAAlignedDacPrepareV35 → DOGMASelect2x2TestTilesV351 (pick a block with block_x/block_y, 0-1) → this node for the noise, then a standard two-pass high/low sampling pair per tile, then DOGMACombine2x2TestTilesV351 to assemble the patch for eyeballing. Compare it against the same patch sampled full-frame - or against a run using plain per-tile random noise. If the aligned version is seamless and the random version shows a grid, your plumbing is right and you can afford the full run.

Install

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

Or ComfyUI Manager → DOGMA Nodes; restart either way, since the pack registers its nodes at import. Zero pip dependencies. The companion nodes you need for this to be useful - the 2x2 selector, the combiner and the geometry prep - are in the same pack; the README doesn't document any of them.

Common issues

"2x2 test needs at least 2x2 grid". The 2x2 selector throws this when dac_data describes a single-row or single-column grid. Push tile_size down or target_scale up so the prep node actually divides the canvas.

The four tiles look right and the full grid doesn't. Then your problem isn't the noise mechanism, it's the stitch or a leaked per-tile seed somewhere downstream. That's what the test is for.

Noise that doesn't match a full-frame run. It won't, exactly - the field is generated at the working canvas size, so a test block is a crop of a 2x-scale field rather than the original. Compare tiles against each other, not against the pre-upscale image.

List lengths mismatch in the sampler. noise is a list of four; your per-tile sampling branch has to iterate tiles, not tiles-plus-one.

CategoryDOGMA/Semantic Detailer

Inputs (2)

NameTypeDefaultDescription
test_dataDOGMA_TEST_DATA
seedINT19760–18446744073709550000

Outputs (2)

NameTypeDescription
noiseNOISE
infoSTRING