XListCreate
Pack a pile of inputs into one list — empty ports quietly skipped
- inputs
- list
- count
- slot_map
ComfyUI has a stock CreateList, and this is that idea plus the two things that make lists actually usable in a graph: a count you can wire around, and a position record so you can put the list back together later. XListCreate gathers however many inputs you connect - the ports auto-grow up to 50 - and packs only the connected ones into one compact list. Empty ports are skipped silently, which sounds trivial until you've wired a workflow where some branches produce nothing and the list would otherwise be full of holes.
How it works
Connect single values into the growing inputs ports. Anything you can put on a wire goes in - images, strings, conditioning, latents, whatever, because the list element type matches through. The node flattens multi-value lists into the output list (matching stock CreateList's behavior), then hands you three outputs:
- list - the compact list, in port order, length equal to count.
- count - how many values ended up in the list. This is the useful one: wire it into XListPull or XListToPipe and they'll size their own ports to match automatically.
- slot_map - a position record (no media in it) tracking which input port each item came from. That's the handshake for XListRestore.
The trap to know about
Flattening is the gotcha. If you connect a multi-value list into one port, XListCreate happily flattens it into the output - but then the slot_map can't put several items back into one slot, and XListRestore will error. The node's own tooltip says it plainly: split lists into single values when you plan to restore positions. For the common case - packing distinct outputs into a list, processing them, pulling them back out - this is painless plumbing.
Installing it
XListCreate ships in ComfyUI-Xz3r0-Nodes (by Xz3r0-M) under ♾️ Xz3r0/Workflow-Processing. ComfyUI Manager: search ComfyUI-Xz3r0-Nodes and install. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/Xz3r0-M/ComfyUI-Xz3r0-Nodes.git
cd ComfyUI-Xz3r0-Nodes
pip install -r requirements.txt
Restart ComfyUI after. No models, no GPU cost, and no FFmpeg involvement - this is pure graph plumbing.
Tips
The node carries search aliases like "Iterator" and "List Builder", so it'll show up when you're hunting for iteration helpers. Its natural partners are the rest of the pack's list family - XListPull to split a list back into individual ports, XListRestore to scatter processed items back into their original positions, XListToPipe to push the list into an XPipe bundle. Used alone it's a tidy way to bundle a variable number of things into one wire that a batch-processing node can chew on.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| inputs | COMFY_AUTOGROW_V3 | Connect single values to add them to the list. A multi-value list is flattened into the output list, but XListRestore cannot put several items back into one slot — split lists into single values when you plan to restore positions. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| list | COMFY_MATCHTYPE_V3 | The compact list holding every connected value, in port order. Length equals count. |
| count | INT | How many values are in the list. Connect to XListPull to choose how many output ports it shows. |
| slot_map | xlist_slot_map | Position record only (no media). Tracks which input port each list item came from. Connect to XListRestore to put items back into their original ports. Each input port must carry a single value; multi-value lists cannot be restored. |