D2 XY List Collector
Catch every value the XY plot spits out into one tidy array
- data
- grid_pipe
- output
XY plots are the community's favorite answer to "how do I compare 30 seeds without babysitting 30 runs?" - the workflow loops through every combination, renders each cell, and assembles a grid. The D2 pack's XY Plot is one of the most flexible takes on that idea. D2 XY List Collector is the quiet helper at its edge: it watches every iteration of the loop, scoops the value you hand it into an array, and hands you the whole list in one piece when the grid is done.
Why would you want that? Because an XY plot is fundamentally about generating images, but sometimes what you actually care about is the data per cell - a loss value, a token count, a seed, a filename. Collector turns the plot into a data-gathering loop. Post-process the array, save it to disk, feed it into another node. You get all the runs and none of the manual bookkeeping.
How it works
This is a loop node, so the mechanism matters more than usual. You wire your value into data, and connect either xy_status or grid_pipe from the XY Plot:
xy_status(a STRING socket, force-input) is the plot's control signal.INITtells the collector to clear its array at the start of a run; an empty string is "just append";FINISHmeans the last cell is done, so output the whole accumulated array.grid_pipeis the alternative for D2 XY Plot Easy / Easy Mini, which don't expose a status output - their customD2_TGridPipesocket carries the same signal. Connect one or the other; if both are present,grid_pipewins.
While it's collecting, the node blocks anything downstream with an execution blocker, so your post-processing can't run on a half-built list. The pack also deliberately forces a re-execute every pass (its fingerprint returns NaN), because otherwise ComfyUI's output caching would see identical inputs and skip the run - silently dropping items from your array.
The inputs to set
- data - anything: a string, number, list, even a tensor. Gets appended to the array as-is.
- skip_empty (default
true) - drops empty strings,0, empty lists, and similar falsy values so they don't pollute the result. Turn off if a0is meaningful data.
Output is a single output (* type) holding the array of everything collected.
Installing it
With the rest of the pack via ComfyUI Manager (search "D2 Nodes"):
cd ComfyUI/custom_nodes
git clone https://github.com/da2el-ai/D2-nodes-ComfyUI
Restart and you're set - dependencies are just piexif and charset-normalizer, no models. Note the pack moved to the ComfyUI V3 schema at v32.0.0, so an outdated ComfyUI won't load it; update ComfyUI or pin the pack before that release.
Where people get stuck
The classic trap: if your XY Plot has only a single item, FINISH never fires, so the collector never outputs anything. No grid, no array, and the node looks broken. Add a second value to the plot. Second gotcha: if you skip skip_empty and feed it a mix of real values and blanks, your array has holes in the middle - the empty rows don't shift the grid, they just show up as gaps. And if your collection comes out one element short, check that you're connected to grid_pipe for the Easy variants, not a dangling status wire.
It's a niche node for a niche workflow. But if you're already running D2's XY Plot and want the per-cell data to come back out, this is the piece that makes the loop feel complete.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| data | * | — | |
| skip_empty | BOOLEAN | true | — |
| xy_statusopt | STRING | — | |
| grid_pipeopt | D2_TGridPipe | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | * | — |