Nodes/cgem156-ComfyUI๐ŸŒ/Sampler Custom XY ๐ŸŒ
ComfyUI Node

Sampler Custom XY ๐ŸŒ

Running a whole parameter grid through one sampler node

By laksjdjfยทCreated 2 years agoยทUpdated about a month agoยท 93
Sampler Custom XY ๐ŸŒ
  • model_xy
  • positive
  • negative
  • sampler
  • sigmas
  • latent_image
  • output
  • denoised_output
โ—„add_noisetrueโ–บ
โ—„noise_seed0โ–บ
โ—„cfg8.0โ–บ

ComfyUI has no built-in equivalent of Automatic1111's XYZ Plot script, so any grid comparison - LoRA strength across rows, CFG across columns, that kind of sweep - has to be assembled by hand. Sampler Custom XY is the sampling half of cgem156's homegrown version of that workflow: instead of taking a single MODEL, it takes model_xy, an XY_MODEL - a grid of models, presumably one per combination of whatever's being swept - and runs the sampling pass across the entire grid in one node, instead of you re-running the graph once per combination by hand.

Worth flagging honestly: whatever builds an XY_MODEL isn't part of this batch of node writeups, so its exact schema isn't something verified here directly. Everything below covers what this node does with that grid once it has one.

The inputs that matter

Beyond model_xy, this is otherwise a fairly ordinary "assemble your own sampler" node:

  • add_noise - whether to add fresh initial noise, or treat latent_image as already partially denoised and sample from there as-is.
  • noise_seed - standard seed, feeding whatever initial noise gets added.
  • cfg (0โ€“100, default 8) - classifier-free guidance strength, same meaning as on any sampler.
  • positive / negative - your CONDITIONING, i.e. your prompts.
  • sampler - a SAMPLER object; this pack's TCDSampler or SamplerEulerAncestralFixedNoise plug in here, or any of ComfyUI's stock samplers via KSamplerSelect.
  • sigmas - a SIGMAS schedule; this pack's TextScheduler can supply one if you want an exact hand-typed schedule instead of a preset.
  • latent_image - your starting latent.

Outputs are output and denoised_output (both LATENT) - the grid's worth of resulting latents. Decode them to images and feed the batch, along with whatever xy_list your grid-builder produced, into this pack's PreviewXY to see the labeled comparison.

Using it

This node isn't usable on its own - it's the middle piece of a three-part flow: something builds an XY_MODEL (and typically an XY_LIST for labeling), this node samples across it, and PreviewXY renders the result as a grid. If you don't already have a grid-builder feeding model_xy, this node has nothing to chew on.

Installing it

Via ComfyUI Manager: search cgem156-ComfyUI, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/laksjdjf/cgem156-ComfyUI

Restart afterward. No model downloads for the node itself - you'll need whatever LoRAs or checkpoints your actual sweep is comparing, same as any normal generation.

Common issues & troubleshooting

Nothing to connect to model_xy. You need the pack's grid-builder node upstream first - this sampler doesn't create the sweep, it only runs it.

Grid runs but PreviewXY output looks misaligned. Check that the image batch you decode from output/denoised_output stays in the same order as the xy_list your grid-builder produced - reordering or filtering the batch anywhere in between will desync the labels from the images.

Slow generation. Expected - this node is sampling an entire grid of combinations in one pass, which is inherently N-times the compute of a single generation, where N is your grid's cell count.

You were hoping for a polished, documented XYZ-plot feature. This corner of the pack (lora_xy) is functional but self-assembled and thin on documentation - there's no README section for it and effectively no community discussion. If you just need occasional side-by-side comparisons rather than a repeatable grid tool, manually queueing a few runs and comparing outputs by eye may honestly be less friction than wiring up this toolchain.

Categorycgem156 ๐ŸŒ/lora_xy

Inputs (9)

NameTypeDefaultDescription
model_xyXY_MODELโ€”
add_noiseBOOLEANtrueโ€”
noise_seedINT00โ€“18446744073709550000โ€”
cfgFLOAT8.00โ€“100โ€”
positiveCONDITIONINGโ€”
negativeCONDITIONINGโ€”
samplerSAMPLERโ€”
sigmasSIGMASโ€”
latent_imageLATENTโ€”

Outputs (2)

NameTypeDescription
outputLATENTโ€”
denoised_outputLATENTโ€”