Nodes/ComfyUI_DAO_master/Clone Grid (Path)
ComfyUI Node

Clone Grid (Path)

Fill a grid from a folder, shuffle optional

By orion4d·Created about a year ago·Updated 12 months ago· 11
Clone Grid (Path)
    • image
    • mask
    folder_path
    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
    shufflefalse
    seed0

    Clone Grid (X/Y) repeats one image across a grid. Clone Grid (Path) fills the same grid with images pulled from a folder - different sprite per cell, shuffled or in order, at your discretion. It's the grid version of the pack's Clone Circular (Path): same layout brain, folder-based input.

    It ships in orion4d/ComfyUI_DAO_master, the French-authored vector-and-image utility pack. This is the node for contact sheets, thumbnail walls, sprite atlases from a batch of generations, and any "lay out my folder of outputs as a grid" job you'd otherwise do in a separate script. If you just generated a hundred variations and want one glanceable wall of them, this is your node.

    How it works

    The one required input is folder_path - a string pointing at a directory of images. Then the grid controls mirror the single-image version: count_x/count_y, spacing_x/spacing_y, offset_x/offset_y, the row_offset_x/col_offset_y brick stagger, plus per-clone rotation, scale, and opacity. canvas_mode here offers custom or auto_from_grid (no match_input, since there's no single input image to match).

    The folder-specific extras are shuffle and seed. Shuffle on and the node randomizes which image lands in which cell, with the seed making it reproducible. Shuffle off and it fills in folder listing order, cycling if the grid is bigger than the folder contents.

    Outputs are image and mask (union of all placed clones).

    The settings that matter

    • folder_path - where your images live. Get this right first; everything else is cosmetic.
    • count_x / count_y - grid density.
    • shuffle + seed - order control. Set a seed when you need a stable layout across runs.

    Installing

    Via ComfyUI Manager (search ComfyUI_DAO_master) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/orion4d/ComfyUI_DAO_master.git
    

    No extra pip packages - pure Pillow/numpy. Restart and you're set.

    Where people get burned

    Same path pitfall as the other "Path" nodes: backslashes on Windows eat your path, so use forward slashes (C:/images/wall/) or escaped ones. And note the images get squashed to the grid cell size regardless of their native aspect ratio - if your folder holds mixed dimensions, pre-normalize or expect distortion. A wrong folder path fails quietly into an empty grid, so verify the path before chasing layout settings.

    CategoryDAO_master/Images/Clone

    Inputs (19)

    NameTypeDefaultDescription
    folder_pathSTRING
    canvas_modeCOMBOcustom2 options: custom, auto_from_grid
    canvas_widthINT10241–32768
    canvas_heightINT10241–32768
    use_backgroundBOOLEANfalse
    background_hexSTRING#00000000
    count_xINT41–4096
    count_yINT41–4096
    spacing_xINT20-10000–10000
    spacing_yINT20-10000–10000
    offset_xINT0-10000–10000
    offset_yINT0-10000–10000
    row_offset_xINT0-10000–10000
    col_offset_yINT0-10000–10000
    rotationFLOAT0.0-1440–1440
    scaleFLOAT1.000.01–10
    opacityFLOAT1.000–1
    shuffleBOOLEANfalse
    seedINT00–2147483647

    Outputs (2)

    NameTypeDescription
    imageIMAGE
    maskMASK