Clone Grid (X/Y)
Wallpaper, patterns, and brick offsets in one node
- image
- mask
- image
- mask
Making a grid of an image is something you can do with ComfyUI's built-in nodes - if you enjoy stacking a dozen Tile/Repeat/Offset nodes and losing track of which one does what. Clone Grid (X/Y) collapses the whole thing into a single node: repeat one sprite across a grid with full control over spacing, staggering, rotation, scale, and opacity, and get the composite plus a union mask out.
It's from orion4d/ComfyUI_DAO_master, the French-authored vector-and-image utility pack. Where the pack's circular clone makes mandalas, this makes wallpaper previews, repeating pattern mockups, tiled textures, barcode matrices, and contact-sheet-style layouts.
How it works
You feed it one image (optionally a mask to crop the sprite) and it stamps copies across a canvas. count_x and count_y set the grid density, spacing_x/spacing_y the gaps between copies, and offset_x/offset_y position the whole grid. The two killer knobs are row_offset_x and col_offset_y: they shift every other row horizontally (classic brick pattern) or every other column vertically (quincunx / diamond layout). Those two inputs are the reason you'd use this instead of a boring uniform grid.
Per-clone transformation is uniform across the grid: rotation spins each copy, scale resizes, opacity fades. canvas_mode lets you pick custom (explicit width/height), auto_from_grid (sizes the canvas to fit the grid), or match_input (matches the source image dimensions). use_background + background_hex fill the canvas or keep it transparent.
Outputs: image (RGBA) and mask (union of all clones).
The settings that matter
row_offset_x/col_offset_y- the stagger controls. Set one and the grid stops being a boring lattice.count_x/count_y- grid size. Mind the max: up to 4096 per axis, but your CPU will notice long before that.canvas_mode-auto_from_gridis the "just make it fit" button; reach forcustomwhen you need an exact canvas size.
Installing
Via ComfyUI Manager (search ComfyUI_DAO_master) or:
cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/ComfyUI_DAO_master.git
Restart and done - pure Pillow/numpy, no extra dependencies.
Where people get burned
The stagger knobs only affect alternate rows/columns - if you're trying to offset every row, that's not what row_offset_x does. And as with the circular clone, big count values on a large canvas get slow; for a seamless-pattern sanity check, keep the canvas small and the count modest.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| maskopt | MASK | — | |
| canvas_modeopt | COMBO | custom | 3 options: custom, auto_from_grid, match_input |
| canvas_widthopt | INT | 10241–32768 | — |
| canvas_heightopt | INT | 10241–32768 | — |
| use_backgroundopt | BOOLEAN | false | — |
| background_hexopt | STRING | #00000000 | — |
| count_xopt | INT | 41–4096 | — |
| count_yopt | INT | 41–4096 | — |
| spacing_xopt | INT | 20-10000–10000 | — |
| spacing_yopt | INT | 20-10000–10000 | — |
| offset_xopt | INT | 0-10000–10000 | — |
| offset_yopt | INT | 0-10000–10000 | — |
| row_offset_xopt | INT | 0-10000–10000 | — |
| col_offset_yopt | INT | 0-10000–10000 | — |
| rotationopt | FLOAT | 0.0-1440–1440 | — |
| scaleopt | FLOAT | 1.000.01–10 | — |
| opacityopt | FLOAT | 1.000–1 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |