XY Grid Helper
Meet the node with the Reset button — the brain of this whole pack
- row_list
- column_list
- index
- row_value
- column_value
- xy_grid_control
The entire point of kenjiqq/qq-nodes-comfyui is this node. You feed it two lists - rows and columns - and for every prompt you queue it hands you one row value and one column value, so a grid of prompts × CFG (or any two axes you like) falls out of a normal ComfyUI queue. It's the pack's answer to Efficiency nodes' XY Plot and Easy Use's XY plot, and the r/comfyui consensus is that it's more verbose to set up but can grid "basically anything" - because you build the lists yourself instead of picking from a fixed menu of axis types.
The catch, and the first thing anyone who uses this pack learns: there's a ritual.
The reset ritual
Somewhere on the node you'll find a Reset button (it's a custom QQINDEX widget). Here's the flow, exactly:
- Click Reset before you start a run. This sets the internal counter to 0.
- Queue as many prompts as your grid needs -
len(row_list) × len(column_list). - As prompts queue, the button label updates to "Reset - x of N" - your current count vs. the total. Queue until x equals N.
Forget to reset and the grid will happily continue from wherever the counter was left, mixing old runs into new ones. This is the #1 mistake with this pack, and it's also the #1 thing people complain about. It's a genuinely odd interaction - most node packs don't make you click a button and count your own prompts - but once it's in muscle memory it's fine.
Inputs that matter
- row_list / column_list - the two LISTs of values to sweep. Build them with this pack's Any List, Load Lines From Text File, or Text Splitter. Row values are on the horizontal axis, columns on the vertical.
- row_prefix / column_prefix - text prepended to every label, e.g.
"prompt"turns a row label into"prompt: sunset city". Use it to keep grid axes identifiable. - page_size - rows per output grid before it splits into a new grid. Big grids eat VRAM; 10 is the default and a sensible place to start.
- label_length / font_size / grid_gap - how labels wrap (characters before a line break), label font size, and the gap in pixels between images. Fiddly, but this is the only way to stop a 20-character label from blowing out your grid cells.
Outputs
- row_value / column_value - the current combo, but as the pack's special
AXIS_VALUEtype. ComfyUI won't wire an unknown type anywhere, so you route these through an Axis To X converter (Axis To STRING, Axis To MODEL, Axis To FLOAT…) to get a concrete type for your target node. - xy_grid_control - a control tuple you feed straight into XY Grid Accumulator so it knows how many images to collect and how to label them.
How it picks values
The node always runs (IS_CHANGED returns NaN), computes index % total to pick the current (row, column), and builds the annotation strings the grid renderer will draw. Because it wraps, queueing more than the total starts a second pass rather than erroring.
When it breaks
There was a period where a ComfyUI frontend update (the Proxy-objects era of the new canvas) broke the Reset button - the community workaround was hand-editing the pack's extension.js with a safeClone helper. Current versions of the pack ship that fix, so if your Reset button ever stops counting, update the pack, don't patch it by hand.
Installing it
No requirements.txt - just clone and restart:
cd ComfyUI/custom_nodes
git clone https://github.com/kenjiqq/qq-nodes-comfyui
Or via ComfyUI Manager, search qq-nodes-comfyui. You'll also want images-grid-comfy-plugin (LEv145) if you want the final annotated grid image - the accumulator injects it behind the scenes.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| row_list | LIST | — | |
| column_list | LIST | — | |
| row_prefixopt | STRING | — | |
| column_prefixopt | STRING | — | |
| page_sizeopt | INT | 10 | — |
| label_lengthopt | INT | 50 | — |
| font_sizeopt | INT | 50 | — |
| grid_gapopt | INT | 20 | — |
| indexopt | QQINDEX | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| row_value | AXIS_VALUE | — |
| column_value | AXIS_VALUE | — |
| xy_grid_control | XY_GRID_CONTROL | — |