D2 XY Plot
Grid any parameter, keep the labels honest
- reset
- index
- remaining_time
- xy_seed
- progress_bar
- grid_pipe
- X
- Y
- x_annotation
- y_annotation
- status
- index
ComfyUI's whole promise is "if you can express it as a graph, you can run it" - and the thing everyone immediately wants to run is a grid of variations. D2 XY Plot is the pack's general-purpose answer: a node that takes any two lists of values, runs every combination as its own queue, and hands off cleanly to D2 XY Grid Image so you end up with one labeled comparison instead of a folder of orphans. D2 XY Plot Easy exists for sampler parameters; this one exists for everything else.
How it works
You define an X axis and a Y axis, each with a type and a newline-separated list. x_type / y_type choose STRING, INT, or FLOAT - the data type the list values are parsed as. Each queue execution picks one cell (X value × Y value) and outputs it on the X and Y outputs, plus a status signal and an index. With auto_queue on, running it once queues exactly len(x) × len(y) jobs; the node's frontend tracks the current cell, remaining time, and progress as it grinds through.
The key property that makes it the "general" one: it doesn't know or care what the values are for. It just hands you the current X and Y values as outputs, and you decide what they vary. Same node can drive a prompt comparison, a steps sweep, a seed set, or a controlnet strength ladder - you wire the X/Y outputs into whatever input you're testing. That's the tradeoff vs. D2 XY Plot Easy, which bakes sampler parameters in and is easier but less flexible.
Inputs and outputs
x_type/y_type- STRING, INT, or FLOAT.x_title/y_title- the axis header text drawn on the grid.x_list/y_list- the values, one per line.auto_queue- queue the full grid automatically (true) or step manually (false).start_index- resume from a specific cell;resetzeroes the index when you stop mid-grid.
Outputs: grid_pipe (one wire into D2 XY Grid Image), X and Y (the current cell values, wire into what you're varying), x_annotation / y_annotation, status, and index. For most grids you'll use exactly three: grid_pipe to the grid node, X and Y to the parameters under test.
Common setups
- Prompt sweeps: use D2 XY Prompt SR to build a list of prompt variants, feed it as
x_listwithx_type: STRING, and routeXinto a sampler's prompt. Setx_titleto something descriptive and the grid labels itself. - Numeric sweeps:
steps,cfg,denoise- list the values, set the type to INT or FLOAT, wireXinto the sampler widget (you'll often need a text/number node between, since the plot outputs a value and the target expects a typed input). - Seed variation: put seeds in
x_listwithx_type: INT, and pair with a seed-shifting node or aD2 XY Seedlist if you want the plot to generate them.
Installing
Part of D2 Nodes ComfyUI:
cd ComfyUI/custom_nodes
git clone https://github.com/da2el-ai/D2-nodes-ComfyUI
or search "D2 Nodes ComfyUI" in ComfyUI Manager. No models, light deps.
The gotchas
- Reset before re-running. Stop mid-grid and the internal index keeps counting; your second run starts at the wrong cell. Hit Reset or set
start_index. auto_queueoff means nothing queues automatically. People forget this and call the node broken. It isn't.- Status is the contract with the grid. The
grid_pipe→ D2 XY Grid Image wiring carries theINIT/FINISHsignals the grid needs to assemble. Skip that wire and you'll collect images forever with no grid.
D2 XY Plot is the node to reach for when the Easy variant's parameter menu can't express what you're testing. It's more wiring, but it's the difference between "I can plot sampler settings" and "I can plot literally anything."
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| x_type | COMBO | 3 options: STRING, INT, FLOAT | |
| x_title | STRING | — | |
| x_list | STRING | — | |
| y_type | COMBO | 3 options: STRING, INT, FLOAT | |
| y_title | STRING | — | |
| y_list | STRING | — | |
| auto_queue | BOOLEAN | true | — |
| start_index | INT | 0 | — |
| resetopt | D2_BUTTON | — | |
| indexopt | D2_XYPLOT_INDEX | — | |
| remaining_timeopt | D2_TIME | — | |
| xy_seedopt | D2_SEED | — | |
| progress_baropt | D2_PROGRESS_BAR | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| grid_pipe | D2_TGridPipe | — |
| X | * | — |
| Y | * | — |
| x_annotation | D2_TAnnotation | — |
| y_annotation | D2_TAnnotation | — |
| status | STRING | — |
| index | INT | — |