XYZ Grid Input (Batch)
The List-Friendly Version
- x_values_batch
- y_values_batch
- z_values_batch
- total_combinations
XYZ Grid Input (Batch) is the sibling of XYZ Grid Input, and the difference is one word: instead of handing you one combination per run, it dumps all of them at once as three lists. Same comma-separated input parsing, same itertools.product combination order, zero index-wrangling. If you've already built a workflow that loops over lists natively, this is the node that feeds it.
When you'd actually use it
The catch, and it's a real one: this node is only useful if the nodes downstream in your graph accept list inputs. Standard ComfyUI nodes mostly don't - a KSampler wants a single prompt string, not a list of them. But list-aware nodes (prompt-list iterators, batch string processors, or any of the newer nodes built on ComfyUI's list-output support) take x_values_batch and friends straight in. The README positions it for "workflows that support batch processing," which is honest: if your graph can consume a list, you get the whole sweep in one queue pass instead of nine.
For the classic manual-index flow - XYZ Grid Input → Auto Collector → Stitch - you don't want this node. It has no index output to drive the collector, and the collector still needs one image per combination, which means whatever consumes the lists still has to run once per combo. It changes how the sweep is driven, not how many images get made.
Inputs and outputs
Three required inputs, all multiline comma-separated strings, and z_values is the only one you'll routinely leave empty to opt out of the third axis.
The outputs are three lists plus a count:
x_values_batch,y_values_batch,z_values_batch- every combination value for each axis, in lockstep. Index N of all three together is combination N.total_combinations- the product of your axis sizes, for anything downstream that wants to know how many items to expect.
Note there are no *_index outputs here and no grid_info readout - it's a batch generator, not a per-run position tracker.
Installing
Same pack, same drill. ComfyUI Manager → search "XYZ Grid", or:
cd ComfyUI/custom_nodes/
git clone https://github.com/psdwizzard/Comfyui-XYZ-stitch.git
Restart, and it lands under "XYZ Grid" with no extra dependencies - no requirements.txt, nothing to download.
A word of caution
Because it emits lists on every execution, it's easy to accidentally feed those lists into a node that only accepts a single string - ComfyUI will either throw or do something surprising, and the error message rarely tells you the real story. If you see a "got list, expected string"-style failure, you've likely wired a batch output into a non-list input. When in doubt, reach for plain XYZ Grid Input; this variant exists for the specific case where your pipeline already thinks in lists.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| x_values | STRING | red, blue, green | Comma-separated values for X axis |
| y_values | STRING | 1, 2, 3 | Comma-separated values for Y axis |
| z_values | STRING | Comma-separated values for Z axis (leave empty to disable) |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| x_values_batch | STRING | — |
| y_values_batch | STRING | — |
| z_values_batch | STRING | — |
| total_combinations | INT | — |