XY Plot: Queue (lab)
The auto-queuing engine behind every ComfyLab grid
- dim1
- dim2
- index
- xy_plot_data
- dim1_value
- dim2_value
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_STATUSinput, 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
Anyoutputs 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.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| dim1 | LIST | list of values, processed by queue as the 1st dimension tip: associate slow operation, like loading checkpoint, to dim1, to ensure better performance | |
| dim2opt | LIST | optional: list of values, processed by queue as the 2nd dimension | |
| indexopt | QUEUE_STATUS | current queue status | |
| max_dim1_per_pageopt | INT | 0 | optional: if > 0, max number of dim1 values per page |
| max_dim2_per_pageopt | INT | 0 | optional: if > 0, max number of dim2 values per page |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| xy_plot_data | XY_PLOT_DATA | data sent by the queue, to indicate the cuttent state of processing |
| dim1_value | * | dim1 value (not typed) |
| dim2_value | * | dim2 value (not typed) |