ComfyUI Node

DP Latent Split

Chop a latent into tiles for tiled workflows

By DesertPixelAi·Created 2 years ago·Updated about a year ago· 25
DP Latent Split
  • latent
  • latent_grid
  • latent_grid_flipped
  • latent_grid_plus_flipped
rows2
columns4
overlap_pixels0

Tiled workflows - tiled upscaling, tiled sampling, anything where you process a big image in chunks instead of all at once - need the latent chopped into pieces first. This node does that split: give it a latent and a rows × columns grid, and it hands back the tiled pieces, with a couple of extra variants that are worth understanding before you wire it in.

How it works

rows and columns define the grid you're splitting into - 2 rows by 4 columns by default, so 8 tiles out of the box. overlap_pixels adds a margin of shared content between adjacent tiles, which matters a lot for tiled upscaling specifically: without overlap, the seams between tiles tend to show up as visible lines in the final stitched image once each tile gets processed independently and reassembled, because each tile's edge pixels had no context from its neighbor. Overlap gives the reassembly step (elsewhere in your workflow, typically a matching tile-merge node) something to blend across.

The three outputs are the part to actually pay attention to. latent_grid is the straightforward tiled split. latent_grid_flipped is the same split, mirrored. latent_grid_plus_flipped combines both into one batch - effectively doubling your tile count by including both orientations. The practical use for the flipped variants: if you're running a tile-based upscale or detail pass and seeing directional artifacts (streaks or patterns that line up with the tile grid), processing both the normal and mirrored orientation and blending them is a known way to break up that directionality, since the artifacts from each orientation tend not to line up with each other.

Inputs and outputs

Required:

  • latent - the latent to split.
  • rows - 1 to 8, default 2.
  • columns - 1 to 8, default 4.
  • overlap_pixels - 0 to 128, step 8, default 0. Zero means clean-cut tiles with no shared margin.

Outputs, all LATENT:

  • latent_grid - the tiled split.
  • latent_grid_flipped - the same split, flipped.
  • latent_grid_plus_flipped - both combined into one batch.

How to install it

Search ComfyUI-Desert-Pixel-Nodes in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/DesertPixelAi/ComfyUI-Desert-Pixel-Nodes

Restart, look under DP/latent. No models or extra dependencies - it operates purely on the latent tensor you already have.

Common issues & troubleshooting

Tiles show visible seams once reassembled. This is the classic tiled-processing artifact, and the fix lives on this node: increase overlap_pixels. Zero overlap means every tile edge is a hard cut with no shared context, which is exactly what produces visible grid lines after reprocessing and merging. Start around 32-64 and adjust based on how obvious the seams are.

Downstream node rejects latent_grid_plus_flipped. Because it's a doubled batch (normal orientation plus flipped, combined), whatever you feed it into needs to expect that batch size and be able to tell the two halves apart if it needs to treat them differently - a node built for a single latent_grid-sized batch may choke or silently misbehave on the doubled version. If you're not specifically trying to exploit the dual-orientation trick, use plain latent_grid instead.

Tile count doesn't match what you expected. rows × columns is the total tile count - it's easy to think of these as independent "how many tiles" knobs rather than a grid, and end up with more or fewer tiles than intended. 2 rows × 4 columns is 8 tiles, not 2 or 4.

Reassembly step isn't included here. This node only splits - putting the tiles back together into one image after processing is a separate step elsewhere in your workflow (typically a matching merge/stitch node). If you're missing that half, you'll need to pair this with whatever tile-merge node your workflow already relies on.

CategoryDP/latent

Inputs (4)

NameTypeDefaultDescription
latentLATENT
rowsINT21–8
columnsINT41–8
overlap_pixelsINT00–128

Outputs (3)

NameTypeDescription
latent_gridLATENT
latent_grid_flippedLATENT
latent_grid_plus_flippedLATENT