OpenCV repeat_0
Tile one image into a grid — repeat_0 builds your contact sheet
- src
- dst
- nparray
repeat_0 tiles a single image into a grid - repeat it ny times vertically and nx times horizontally, producing one bigger image. It's numpy's tile exposed as a ComfyUI node by opencv-comfyui (geroldmeisinger/opencv-comfyui).
Where does that get you? Contact sheets and preview grids, mostly. Take one image, repeat it 3×4, and you have a grid you can hand to another node that does something different to each tile - which is a genuinely common pattern for batch-revision workflows where you want to see every variation of one base frame in a single canvas. It's also the raw material for checkerboard textures, seamless-pattern previews, and any "I need this element many times side by side" task that would otherwise require stacking a batch and compositing.
The inputs that matter
src- the image to tile, anNPARRAYfromImage2Nparray.ny- vertical repeats (how many rows of tiles).nx- horizontal repeats (how many columns of tiles).dst- optional out-parameter, OpenCV's call-by-reference leaking through the generator. Leave it unconnected.
Output is one nparray of size (height × ny, width × nx), which you send to Nparrays2Image. That's the whole interface - three inputs, one output.
Installing it
ComfyUI Manager (search "opencv-comfyui"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
restart, and confirm OpenCV is installed:
pip install opencv-contrib-python
No models, no GPU - this is a pure numpy tile under the hood, instant even on big images.
Two things to keep in mind
The order of ny/nx is the one thing people flip. ny is vertical (rows), nx is horizontal (columns). ny=2, nx=3 gives you two rows and three columns. If you set them backwards you'll notice immediately, because the aspect ratio is wrong.
Second, the output is not a ComfyUI IMAGE batch - it's one single image with the pattern baked in. If you actually wanted separate copies of the image as a list (say, to feed a batch processor), you want ComfyUI's batch-tiling machinery instead; repeat_0 is specifically the "paint the pattern onto one canvas" operation. It's a small node, but when you need a grid, it's exactly the one you'd reach for rather than hand-rolling a batch → composite chain.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| src | NPARRAY | — | |
| ny | INT | — | |
| nx | INT | — | |
| dstopt | NPARRAY | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | — |