ComfyUI Node

XY Any (Soze)

The bookkeeping node behind any comparison grid

By SozeInc·Created 2 years ago·Updated 3 months ago· 10
XY Any (Soze)
  • X
  • Y
  • Z
  • X_Labels
  • Y_Labels
  • Z_Labels
  • X Values
  • X Labels
  • Y Values
  • Y Labels
  • Z Values
  • Z Labels
  • Total Images
  • Split Every
X_Label_Fallbackstr()
Y_Label_Fallbackstr()
Z_Label_Fallbackstr()

Comparison grids - sweep two parameters against each other and look at every combination on one contact sheet - go back to A1111's XYZ Plot script, and the idea's alive in ComfyUI too (Efficiency Nodes ships its own XY Plot for the same reason). XY Any is Soze's version of the sweep-setup half of that idea, and its trick is genericity: both X and Y accept ComfyUI's wildcard * type, so you can feed it a list of LoRA names, a list of CFG floats, a list of checkpoint strings - anything - and it doesn't care what the data actually is. It just tracks positions and hands back organized values, labels, and the numbers you need to lay out a grid afterward.

How it works

X and Y are required, so a 2D sweep is the default shape; wire the optional Z and it becomes a 3-axis sweep. Each axis has an optional *_Labels input where you can supply your own readable labels for each value - say your LoRA list is a set of file paths, but you want "Style A" / "Style B" printed on the grid instead of the raw path. Leave *_Labels unwired and the node falls back to whatever *_Label_Fallback you picked: str() just stringifies each raw value, Numbers labels by position instead.

The inputs and outputs that matter

  • X, Y (required, any type) - your two sweep axes.
  • Z (optional, any type) - upgrades the sweep to three axes.
  • X_Label_Fallback, Y_Label_Fallback, Z_Label_Fallback - str() or Numbers, used when you haven't supplied custom labels for that axis.
  • X_Labels, Y_Labels, Z_Labels (optional, any type) - your own labels per axis, overriding the fallback.

Outputs split into per-axis pairs - X Values / X Labels, Y Values / Y Labels, Z Values / Z Labels - plus two bookkeeping numbers, Total Images and Split Every, that a downstream contact-sheet or grid-image node would use to know how many results to expect and how many to fit per row before wrapping to the next line.

This node's real job is being the sweep's bookkeeping brain, not running anything itself - it organizes the combinations, but you still need something else in your graph (a queue loop, a batch runner, or manual iteration) to actually execute one combination per pass.

Installing it

ComfyUI Manager: search ComfyUI_Soze. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/SozeInc/ComfyUI_Soze.git, pip install -r ComfyUI_Soze/requirements.txt, restart. Pure list bookkeeping - nothing to download.

Common issues

Because X/Y/Z accept any type, ComfyUI won't type-check what you plug in for you - feed it two lists of mismatched length and you're likely to end up with an uneven grid, or a Total Images count that doesn't line up with what you actually intend to run. Size your value lists deliberately before wiring them in. This pairs naturally with this pack's own Load Prompt From Folder X Lora and Lora File Loader - feed a list of LoRA paths as one axis and a list of CFG values as the other, and you've got the scaffolding for a real comparison grid without hand-building a dozen separate sampler chains.

Categoryxy

Inputs (9)

NameTypeDefaultDescription
X*
Y*
X_Label_FallbackCOMBOstr()2 options: str(), Numbers
Y_Label_FallbackCOMBOstr()2 options: str(), Numbers
Z_Label_FallbackCOMBOstr()2 options: str(), Numbers
Zopt*
X_Labelsopt*
Y_Labelsopt*
Z_Labelsopt*

Outputs (8)

NameTypeDescription
X Values*
X LabelsSTRING
Y Values*
Y LabelsSTRING
Z Values*
Z LabelsSTRING
Total ImagesINT
Split EveryINT