Nodes/ComfyUI_DAO_master/Clone Grid (X/Y)
ComfyUI Node

Clone Grid (X/Y)

Wallpaper, patterns, and brick offsets in one node

By orion4d·Created about a year ago·Updated 12 months ago· 11
Clone Grid (X/Y)
  • image
  • mask
  • image
  • mask
canvas_modecustom
canvas_width1024
canvas_height1024
use_backgroundfalse
background_hex#00000000
count_x4
count_y4
spacing_x20
spacing_y20
offset_x0
offset_y0
row_offset_x0
col_offset_y0
rotation0.0
scale1.00
opacity1.00

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_grid is the "just make it fit" button; reach for custom when 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.

CategoryDAO_master/Images/Clone

Inputs (18)

NameTypeDefaultDescription
imageIMAGE
maskoptMASK
canvas_modeoptCOMBOcustom3 options: custom, auto_from_grid, match_input
canvas_widthoptINT10241–32768
canvas_heightoptINT10241–32768
use_backgroundoptBOOLEANfalse
background_hexoptSTRING#00000000
count_xoptINT41–4096
count_yoptINT41–4096
spacing_xoptINT20-10000–10000
spacing_yoptINT20-10000–10000
offset_xoptINT0-10000–10000
offset_yoptINT0-10000–10000
row_offset_xoptINT0-10000–10000
col_offset_yoptINT0-10000–10000
rotationoptFLOAT0.0-1440–1440
scaleoptFLOAT1.000.01–10
opacityoptFLOAT1.000–1

Outputs (2)

NameTypeDescription
imageIMAGE
maskMASK