Nodes/comfyui_bmad_nodes/Repeat Into Grid (latent)
ComfyUI Node Runs on cloud

Repeat Into Grid (latent)

Repeat Into Grid (latent) tiles before the VAE decode

By bmad4ever·Created 3 years ago·Updated 9 months ago· 70
Repeat Into Grid (latent)
  • samples
  • LATENT
columns3
rows3

Repeat Into Grid (latent) is the latent-space twin of the pack's image-grid node, and it does what the name says: takes your samples and tiles them into a columns × rows grid of identical latent copies. The image version repeats pixels after the VAE decode; this one repeats before it, in the compressed latent space, so the entire grid gets decoded in a single VAE pass. Same idea, different end of the pipeline.

The reason to prefer the latent version is mostly about keeping things in one domain. If you're building a tiled or grid-based regional workflow, you often want to work with one big latent from the start - feed it to a KSampler that operates on the whole grid, or hand it to a tiling setup - rather than generating a grid of separate images and stitching them. It's also slightly cheaper in VRAM churn: one decode of a grid instead of N decodes of single tiles.

How it works

Mechanically it's a PyTorch repeat on the latent tensor along the spatial axes - rows repeats vertically, columns horizontally. No interpolation, no blending, pixel-identical copies in whatever the latent space is. The node copies the latent dict (so the noise/noise_mask entries carry along) and returns the tiled samples.

Inputs: samples (LATENT), columns, rows (both default 3, max 8). Output: a single LATENT holding the grid.

Latent → Repeat Into Grid (latent) → LATENT (the grid)

From there, VAE Decode it and you have your contact sheet, or keep sampling on the grid directly.

Installing

Ships in comfyui_bmad_nodes, bmad4ever's grab-bag of API, CV, and utility nodes. ComfyUI Manager - search "comfyui_bmad_nodes" (or "Bmad Nodes") - install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/bmad4ever/comfyui_bmad_nodes
cd comfyui_bmad_nodes
pip install -r requirements.txt

Restart after. No model files to fetch. This node is pure torch, so it doesn't even pull on the pack's opencv/scikit-image requirements - those only matter for the CV half.

The one thing to remember

Since the latent repeats carry over the same sampling noise, all copies in the grid decode to the same image. That's the point - it's a repeat, not a variation. If you want a grid of different outputs, you want a batch of distinct latents, not this node. And as with the image version, if you later split the grid apart with UnGridify (image), make sure the grid dimensions divide evenly, or the edge tiles get silently cropped. For everything else, this is a straightforward, boring, reliable utility - which is exactly what you want from a grid helper.

CategoryBmad/latent

Inputs (3)

NameTypeDefaultDescription
samplesLATENT
columnsINT31–8
rowsINT31–8

Outputs (1)

NameTypeDescription
LATENTLATENT