Nodes/ComfyUI-LZNodes/LZ XY Plot & Sampler
ComfyUI Node

LZ XY Plot & Sampler

One node that sweeps, samples, and spits out a batch

By liz-ils·Created 7 months ago·Updated 12 days ago· 1
LZ XY Plot & Sampler
  • lz_pipe
  • latent_image
  • images
  • lz_pipe
  • x_labels
  • y_labels
  • x_replace_key
  • y_replace_key
  • width
  • height
x_typenone
x_values
y_typenone
y_values
x_replace_key
y_replace_key
replace_escapetrue
seed0
steps20
cfg8.0
sampler_nameeuler
schedulernormal
denoise1.00

The all-in-one of the pack's XY system. LZXYPlotSampler takes your axis definitions and the sampler settings on the same node, loops over every combination, samples each one, decodes, and hands you the whole batch of images with their labels. No separate config node, no pipe gymnastics - feed it a pipe with a model and conditioning, set your axes, hit run, and you get a batch that LZXYGridOutput can turn into a labeled grid.

It's the node to reach for when you just want an answer: which of these two samplers at these three step counts produces the image I actually like. The math is right there in the inputs, which is both its strength and its hazard - because every combination means a full generation, the node is a silent time-burner if you don't check the numbers before you queue.

The inputs that matter

On the sampler side, all required: seed, steps, cfg, sampler_name (the full stock list, default euler), scheduler (default normal), and denoise. On the plot side, the same axis fields as LZXYPlot: x_type/y_type (checkpoint, lora, sampler, scheduler, positive, negative, none), multiline x_values/y_values (one per line), replace keys, and replace_escape. It also takes an optional lz_pipe and optional latent_image.

Seeds are handled deterministically: each cell runs seed + (y_index × x_count + x_index). Same inputs, same seed → same grid, which is what makes a sweep comparable. If you're comparing samplers and want to isolate the sampler's effect, the fixed-seed stepping does that for you automatically.

The one thing that will bite you

LZXYPlotSampler does not encode prompts. It pulls positive and negative conditioning straight out of the pipe - if the pipe only carries positive_text/negative_text (which is all the pack's simple loader gives you), this node errors out with "Missing required data (model, positive, negative)". The modular LZXYSampler in the same pack does auto-encode text when conditioning is absent. So the practical rule: feed LZXYPlotSampler a pipe that already has encoded conditioning (via EZCheckpointLoader or a CLIPTextEncode feeding a pack), or use LZXYSampler for the text-friendly path. People hit this the first time and assume the pack is broken; it's not - it's just stricter.

The positive/negative axis types also need x_replace_key/y_replace_key to be set or the replacement is a no-op, and remember replace_escape is on by default, so underscores become spaces during matching.

Outputs

images (the whole batch, row-major: y outer, x inner), an updated lz_pipe, x_labels/y_labels (comma-joined), the replace keys, and width/height. Wire images + the two label strings into LZXYGridOutput and you have a labeled grid in two hops.

Installing it

Part of the ComfyUI-LZNodes pack:

cd ComfyUI/custom_nodes
git clone https://github.com/liz-ils/ComfyUI-LZNodes

Restart ComfyUI, or Manager → search "ComfyUI-LZNodes". No extra dependencies, no model downloads.

A note on scope: a sampler sweep is only meaningful if your checkpoint's architecture matches the sampler family (Karras/euler-style choices behave very differently on DDPM-style vs flow-matching models - the KB's sampler panel has the whole story). When in doubt, take the model card's pair as the axis and let the grid show you the neighborhood.

CategoryMyCustomNodes/XY

Inputs (15)

NameTypeDefaultDescription
x_typeCOMBOnone8 options: none, checkpoint, diffusion_model, lora, sampler, scheduler, +2
x_valuesSTRING
y_typeCOMBOnone8 options: none, checkpoint, diffusion_model, lora, sampler, scheduler, +2
y_valuesSTRING
x_replace_keySTRING
y_replace_keySTRING
replace_escapeBOOLEANtrue
seedINT00–18446744073709550000
stepsINT201–10000
cfgFLOAT8.00–100
sampler_nameCOMBOeuler44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBOnormal9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
denoiseFLOAT1.000–1
lz_pipeoptLZ_PIPE
latent_imageoptLATENT

Outputs (8)

NameTypeDescription
imagesIMAGE
lz_pipeLZ_PIPE
x_labelsSTRING
y_labelsSTRING
x_replace_keySTRING
y_replace_keySTRING
widthINT
heightINT