- dependencies
- X
- Y
- SCRIPT
If you came to Comfy from Automatic1111 and missed the XY plot script - this is it. XY Plot lays out a grid of generations where one parameter changes across the columns and another down the rows, so you can see, in one image, what steps-vs-CFG or sampler-vs-scheduler actually looks like instead of guessing. It's the single most-loved thing in the Efficiency Nodes pack, and the reason a lot of people install it at all.
How it works
XY Plot is a script node, not a sampler. It outputs a SCRIPT, and that plugs into the script input of a KSampler (Efficient), KSampler Adv. (Efficient), or KSampler SDXL (Eff.). The sampler does the actual runs; XY Plot just tells it "vary this on X and that on Y, then arrange the results into a grid."
You don't type the values into this node directly. Instead you connect an XY Input node to each axis - there's one for every plottable parameter (Steps, CFG Scale, Sampler/Scheduler, Clip Skip, LoRA, VAE, Prompt S/R, and more). This node is the assembler; the XY Input nodes are the ammo.
The inputs and outputs
The two sockets you care about are the optional X and Y inputs (both take the pack's XY type from an XY Input node). Leave one empty and you get a single row or column instead of a full grid - handy for a quick 1D sweep.
The other optional input is dependencies, which accepts the DEPENDENCIES output from an Efficient Loader. For plot types that need to know your checkpoint, VAE or LoRA - anything model-related - this is how the plot gets that context.
The widgets are mostly cosmetic-but-useful:
grid_spacing- pixel gap between cells.XY_flip- swap which parameter is on which axis without rewiring.Y_label_orientation- horizontal or vertical row labels.cache_models- keep loaded models in memory between cells. Leave itTruewhen you're plotting the same checkpoint across many cells; it saves a lot of reloading. Turn it off if you're cycling through many big models and running low on RAM.ksampler_output_image-Imagesgives you the individual results;Plotgives you the assembled grid.
The output is a single SCRIPT → into your Efficient sampler.
Installing it
ComfyUI Manager → search Efficiency Nodes for ComfyUI. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/jags111/efficiency-nodes-comfyui
Restart after. No extra models for the plot node itself, though specific plot types (VAE, LoRA, checkpoint) obviously need those files present.
Common issues
The most common "it didn't plot" is a missing dependencies connection - plot types that vary a model-level thing can't run without the Efficient Loader's DEPENDENCIES feeding in. Wire it.
Second: XY Plot only works with the pack's Efficient KSamplers. Connect its SCRIPT to a stock ComfyUI KSampler and nothing happens, because a vanilla sampler has no idea what to do with a script.
And the pack-wide stuff: if the node doesn't even appear, check the console for IMPORT FAILED (often a pip freeze error) - that's an environment problem, update ComfyUI and the packages and the node. This pack also tends to break on ComfyUI frontend updates; updating the node to the latest commit is the standard fix.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| grid_spacing | INT | 00–500 | — |
| XY_flip | COMBO | 2 options: False, True | |
| Y_label_orientation | COMBO | 2 options: Horizontal, Vertical | |
| cache_models | COMBO | 2 options: True, False | |
| ksampler_output_image | COMBO | 2 options: Images, Plot | |
| dependenciesopt | DEPENDENCIES | — | |
| Xopt | XY | — | |
| Yopt | XY | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SCRIPT | SCRIPT | — |