ComfyUI Node

D2 XY Plot

Grid any parameter, keep the labels honest

By da2el-ai·Created 2 years ago·Updated 30 days ago· 66
D2 XY Plot
  • reset
  • index
  • remaining_time
  • xy_seed
  • progress_bar
  • grid_pipe
  • X
  • Y
  • x_annotation
  • y_annotation
  • status
  • index
x_type
x_title
x_list
y_type
y_title
y_list
auto_queuetrue
start_index0

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; reset zeroes 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_list with x_type: STRING, and route X into a sampler's prompt. Set x_title to something descriptive and the grid labels itself.
  • Numeric sweeps: steps, cfg, denoise - list the values, set the type to INT or FLOAT, wire X into 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_list with x_type: INT, and pair with a seed-shifting node or a D2 XY Seed list 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_queue off 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 the INIT/FINISH signals 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."

CategoryD2/XY Plot

Inputs (13)

NameTypeDefaultDescription
x_typeCOMBO3 options: STRING, INT, FLOAT
x_titleSTRING
x_listSTRING
y_typeCOMBO3 options: STRING, INT, FLOAT
y_titleSTRING
y_listSTRING
auto_queueBOOLEANtrue
start_indexINT0
resetoptD2_BUTTON
indexoptD2_XYPLOT_INDEX
remaining_timeoptD2_TIME
xy_seedoptD2_SEED
progress_baroptD2_PROGRESS_BAR

Outputs (7)

NameTypeDescription
grid_pipeD2_TGridPipe
X*
Y*
x_annotationD2_TAnnotation
y_annotationD2_TAnnotation
statusSTRING
indexINT