Nodes/Basic data handling/convert to Data List
ComfyUI Node

convert to Data List

The bridge from LIST to ComfyUI's native data list

By StableLlama·Created about a year ago·Updated 4 days ago· 48
convert to Data List
  • list
  • *

This is the node that makes the pack's lists do something

Here's the mental model you need for the whole Basic data handling pack. It distinguishes three collection types, and they are not interchangeable:

  • data list - ComfyUI's native list, where every item flows to the next node individually (the whole graph re-runs per item).
  • LIST - a plain Python list passed around as one variable.
  • SET - an unordered collection of unique values.

Most of the pack's list nodes - sort, slice, shuffle, pop, min - operate on LIST, a single object. That's great for manipulating a collection as a unit, but a native data list is what makes ComfyUI process each item separately, which is the engine behind batch workflows. This node is the bridge between those two worlds.

How it works

The trick is in how the node is registered: it marks its output as a list (OUTPUT_IS_LIST), so ComfyUI unwraps the Python list and treats each element as a separate output on the wire. The node itself is nearly empty - it just passes the list through - but the type change is the whole point. Feed it a LIST of ten strings and the downstream node now receives ten individual strings, one per execution.

That's why this node matters more than its trivial implementation suggests: it's how you take all the list-building/editing tools in the pack and actually hand the results to normal ComfyUI nodes that expect per-item inputs.

Inputs and outputs

  • list (LIST) - the Python list you want to fan out.

Output is a wildcard (*) marked as a list: each item flows out individually. What those items can connect to depends on what's in them - strings connect to string inputs, ints to int inputs, and so on.

Installing it

Part of Basic data handling by StableLlama, the r/StableDiffusion regular better known for his model writeups (Flux Klein 9B, RealVisXL) than his code. This pack is deliberately lightweight - zero runtime dependencies in its pyproject, no models, no API keys - so installation is painless.

Install via ComfyUI Manager (search "Basic data handling") or:

cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling

Restart ComfyUI; it's under Basic/LIST.

Troubleshooting

The reverse direction trips people up: a native data list won't plug into this node's input (that wants the pack's LIST type), and the pack has no single "data list → LIST" node in this category - if you end up with a data list, you generally want to keep it as one. Also, once you convert, the downstream node runs once per item, so count your list before converting unless you actually want that fan-out. That behavior is ComfyUI semantics, not a quirk of this node - but it's the thing beginners blame it for.

CategoryBasic/LIST

Inputs (1)

NameTypeDefaultDescription
listLIST

Outputs (1)

NameTypeDescription
**