⏹️ Load 3x3 Grid Series (nhk)
Every file is a 3x3 grid — this node walks it cell by cell
- image
- filename
- current_index
- total_images
- grid_position
- position_name
Load3x3GridSeries is Load2x2GridSeries with nine cells instead of four. Same idea, same machinery: point it at a folder of images that are really 3x3 contact grids, and it hands you one cell per execution, in reading order - top-left, top-center, top-right, then the middle row, then the bottom - advancing automatically until it wraps around. If you batch-compose your generations into 3x3 sheets for review, this is the node that un-sheets them for processing.
It sits in nhk/image next to its 2x2 sibling, and everything about the inputs and outputs carries over. If you've read that article, skip ahead to the separator section - that's the only place the two genuinely differ.
How it works
Each source file is divided into a 3x3 grid using thirds: cell_width = width // 3, cell_height = height // 3. The node keeps a per-label in-memory counter that steps through cells across all files - total_grid_cells = number_of_files × 9 - so index 0–8 are file 1's nine cells, 9–17 are file 2's, and so on, wrapping at the end.
- single_image mode: loads by cell index, auto-advances one cell per run.
indexsets the start,resetjumps back to 0. - random mode: seeded RNG picks a cell between 0 and cells−1. Same seed, same cell, every time.
- separator_width (default 0): a 3x3 grid has two horizontal and two vertical divider lines, and if your composites have visible gutters, naive thirds will slice through them. Set this to the line thickness and the crop boxes pull back from the divider pixels on every edge. (The math is a little more fiddly than the 2x2 version because there are interior lines on both sides of the middle cells, but the effect is the same: clean cells, no gutter bleed.)
Outputs: image (the cell), filename (the source grid file), current_index (cell index across the whole sequence), total_images (total cells = files × 9), grid_position (0–8), and position_name - the 3x3 names are "top-left", "top-center", "top-right", "middle-left", "middle-center", "middle-right", "bottom-left", "bottom-center", "bottom-right". The position outputs make it easy to build a "this file, this cell" log as you process.
Installing
Same routine as the rest of the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Enashka/ComfyUI-nhknodes
or via ComfyUI Manager (search "NHK Nodes"), then restart. No models to fetch, no extra dependencies - it lives under nhk/image.
Where people get burned
- Slivers on cell edges. Your grids have gutters and
separator_widthis 0. Measure the divider and set it. - The counter doesn't match your mental model. It counts cells, not files. A "step" is one ninth of one image. Read
position_nameif you're ever unsure where the sequence actually is. - Repointing the folder without a new
label. The counter carries on from the old sequence. Change the label or flipresetwhen you switch directories. - Odd dimensions. Thirds are integer divisions, so a grid whose dimensions aren't divisible by 3 silently drops edge pixels. Minor, but it's why your bottom-right cell can come out a pixel or two short.
If your workflow is "3x3 contact sheets → individual frames," this is the node. And since the whole series family shares the same label-counter system, you can run a 2x2 loader and a 3x3 loader side by side for different sources without them colliding - just give each a unique label.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | single_image: load by index (use with control_after_generate=increment for sequences), random: load random grid cell by seed | |
| path | STRING | Directory path containing grid images to load | |
| pattern | STRING | * | Glob pattern to filter files (e.g., '*.png', 'img_*.jpg', '**/*.png' for recursive) |
| index | INT | 0 | Starting index for single_image mode (auto-increments with control_after_generate) |
| seed | INT | 0 | Seed for random mode (same seed = same random grid cell) |
| label | STRING | Grid3x3_001 | Unique identifier for tracking this sequence independently from others |
| reset | BOOLEAN | false | Reset counter back to index 0 |
| separator_width | INT | 00–100 | Width of separator lines between grid cells (in pixels). Excludes this many pixels from center lines. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| filename | STRING | — |
| current_index | INT | — |
| total_images | INT | — |
| grid_position | INT | — |
| position_name | STRING | — |