convert to LIST
Convert a data list into a single LIST variable
- list
- LIST
ComfyUI has two ideas that both get called "a list," and confusing them is the single biggest source of data-handling bugs in this whole pack. DataListToList is the bridge between them: it takes a data list (ComfyUI's native list, where each item is processed individually) and returns a LIST (a Python list that travels around as a single variable).
One input, list, one output, LIST. That's the entire node. But understanding why it exists is worth more than the node itself.
The two list types, quickly
The pack's README lays this out cleanly, and it's worth internalizing:
- A data list is what most ComfyUI batch nodes produce. Its items are processed individually - wire it into a node and it runs once per item. Great for iteration, awkward when you want the collection treated as one thing.
- A LIST is a Python list passed as a single value. It's one object on the wire. Downstream nodes see "a list," not "five items." That's what you want when order and the ability to index matter, or when a node's input type is literally
LIST.
So this node is the "pack it into one box" direction. Feed it a data list, and out comes a single LIST variable holding all the items in order.
When you'd actually use it
The most common trigger is a node that expects a LIST input - DictCompare outputs its difference lists as LIST, and various pack nodes take LIST parameters. When your data is coming out of a batch pipeline (data list) and needs to enter a LIST-typed input, this is the adapter. It's also the way to hand a whole collection to something that should see it as one argument rather than iterate.
The reverse direction exists too - the pack's ListToDataList converts a LIST back into a native data list - so the two nodes form a complete round-trip for moving data between ComfyUI's batching model and Python's container model.
How it works
Mechanically it copies the incoming list into a plain Python list object. Because it copies, the conversion is safe and re-runs stay consistent. There's no deduplication, no sorting, no reordering - the order you had is the order you get, duplicates and all.
Installing it
Part of StableLlama's Basic data handling pack - pure Python, zero dependencies:
cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
Restart ComfyUI, or search "Basic data handling" in ComfyUI Manager. Nothing in the pack needs pip installing, so this is the boring, reliable kind of install.
Common issues
The failure mode is conceptual, not mechanical: if you forget which type you're holding, you'll wire the wrong node and get a type error that makes no sense until you remember the two-list distinction. When a connection refuses to match, ask yourself: is this port a data list or a LIST? If it's the latter, this node (or its reverse) is your fix.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| list | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LIST | LIST | — |