Nodes/ComfyLab Pack/XY Plot: Queue (lab)
ComfyUI Node

XY Plot: Queue (lab)

The auto-queuing engine behind every ComfyLab grid

By bugltd·Created 2 years ago·Updated about a year ago· 11
XY Plot: Queue (lab)
  • dim1
  • dim2
  • index
  • xy_plot_data
  • dim1_value
  • dim2_value
max_dim1_per_page0
max_dim2_per_page0

XY Plot: Queue (lab) is the half of ComfyLab's XY plot system that does the actual work. You feed it one list (dim1) and optionally a second (dim2), and it walks through every combination - all dim2 values for the first dim1 value, then all dim2 values for the next, and so on - feeding one value pair into your generation pipeline per queue execution. Its sibling XY Plot: Render (lab) collects the results and assembles the grid.

The name is deliberate and it fixes a real frustration. Traditional XY plot nodes bake in the idea that one dimension is X and the other is Y, which sounds obvious until you want to vary checkpoints (slow) against seeds (fast) and the ordering wrecks your performance. ComfyLab's dim1/dim2 naming signals that rows vs columns is decided later, at render time. What you're choosing here is ordering - and ordering is performance.

The rule that matters

For each dim1 value, all dim2 values iterate before moving on. That means the expensive thing should live on dim1:

  • dim1 = checkpoints, dim2 = seeds → each checkpoint loads once, stays in VRAM, seeds vary. Fast.
  • dim1 = seeds, dim2 = checkpoints → every single image re-loads the checkpoint. Painful.

The author's own tip, and it's right: put slow operations - checkpoint or LoRA loading, anything that reads disk - on dim1.

Inputs and outputs

  • dim1 - the primary list (required). Checkpoints, LoRAs, CFG values, whatever.
  • dim2 - optional secondary list. Leave it disconnected for a single-dimension plot.
  • index - optional QUEUE_STATUS input, for chaining queues.
  • max_dim1_per_page / max_dim2_per_page - pagination. Default 0 = one page with everything. Set a positive number to split the grid across multiple pages - useful when a single grid would be a 20×20 wall of thumbnails.

Outputs:

  • xy_plot_data - the state signal. Wire this to XY Plot: Render's matching input; it's how the render node knows where each image sits in the grid.
  • dim1_value / dim2_value - untyped (Any) values for the current iteration. "What you send is what you get": feed a list of floats to vary CFG, strings to vary model names, ints to vary seeds. Connect them to whatever you're varying.

Auto-queue: the part that saves your evenings

The queue manages itself - no counter to reset, no queue size to babysit. Leave ComfyUI's queue size at 1; the node re-queues internally until every combination is done, and it resets its index cleanly on completion, interruption, or error. People who set queue size above 1 fight the node; people who leave it alone let it run overnight.

Install

ComfyLab Pack installs as one package (nodes show a "(lab)" suffix). ComfyUI Manager: search ComfyLab Pack, install, restart.

cd ComfyUI/custom_nodes
git clone https://github.com/bugltd/ComfyLab-Pack.git
cd ComfyLab-Pack
pip install -r requirements.txt

Restart after. No models, no heavy deps - jsonschema, pyyaml, opencv-python and a few small ones.

Gotchas

  • Type discipline is on you. The Any outputs will happily feed strings into a seed input and error only when KSampler hits them. Check your list types before launching a 200-image run.
  • Empty dim2 is fine (treated as one empty value); empty dim1 is an error.
  • The "XY Plot" you've seen elsewhere is usually a different, KSampler-bound extension - ComfyLab's version is process-independent: anything between queue and render works, including image loads, not just KSampler output.

If you only keep two nodes from this pack, it's this one and XY Plot: Render. Everything else is sugar on top.

CategoryComfyLab/plot

Inputs (5)

NameTypeDefaultDescription
dim1LISTlist of values, processed by queue as the 1st dimension tip: associate slow operation, like loading checkpoint, to dim1, to ensure better performance
dim2optLISToptional: list of values, processed by queue as the 2nd dimension
indexoptQUEUE_STATUScurrent queue status
max_dim1_per_pageoptINT0optional: if > 0, max number of dim1 values per page
max_dim2_per_pageoptINT0optional: if > 0, max number of dim2 values per page

Outputs (3)

NameTypeDescription
xy_plot_dataXY_PLOT_DATAdata sent by the queue, to indicate the cuttent state of processing
dim1_value*dim1 value (not typed)
dim2_value*dim2 value (not typed)