π€ Dataset To Data List
Materialize a dataset as a Data List β the shape the loader's rows output promises
- dataset
- rows
The loader already gives you a rows Data List - so why does this node exist? Because rows is only the untransformed dataset. The moment you chain Filter, Map Column, Shuffle, or Take onto the loader's dataset output, you have a refined dataset with no Data List attached. π€ Dataset To Data List is the bridge: it materializes any dataset the pack produces - loader output or a whole transform chain - into the same Data List shape rows had, so you can shape first and convert last.
How it works
Three inputs, one output:
dataset- whateverHUGGINGFACE_DATASETyou've built up.column- empty means one item per row dict; set it and each item is that column's value instead.limit- caps how many rows get materialized (-1= all).
The output rows is a ComfyUI Data List: the companion Basic data handling pack treats it as one item per row, and it distinguishes two ways of using it. Whole-list nodes (Data List β length, get item, first) receive the entire list in one call. Any other Basic node - a DICT β get, a STRING op - runs once per row, and its output is a new Data List of results. That per-row mapping is the idiomatic way to transform every record in one go, and it's exactly why this converter exists.
The canonical pattern
Load (streaming) β π€ Dataset Filter (label == 1) β π€ Dataset To Data List (limit=50) β Data List β length
Keep only the positive reviews, count them - and because the loader is streaming and the converter's limit is 50, almost nothing actually downloads. This shape-first, materialize-last ordering is the pack's whole design thesis, and To Data List is where a chain of π€ nodes finally hands off to the generic ComfyUI data world.
To Data List vs. To LIST
Both converters take the same inputs and both materialize; the difference is the output shape and what it's good for. To Data List gives per-row processing (a node runs once per row) - right for mapping every row through a transform. To LIST gives one flat Python list - right for whole-list operations like length, get item, or feeding a single column of values into string nodes. Pick the converter that matches what your downstream node expects; switching later is a one-node swap.
Gotchas
Materialization is the moment laziness ends. limit = -1 on a non-streaming dataset has already paid for the full download at the loader, so the converter just builds the list; on a streaming dataset, limit is your real brake - set it or put a Take first, or you may pull far more of the stream than you wanted. Row values are plain Python dicts keyed by column names, with numpy scalars converted for you; image/audio objects pass through unchanged. And spell column exactly - a typo surfaces as a missing-key error on row one.
Installing it
Part of StableLlama/ComfyUI-huggingface_dataset. ComfyUI-Manager β search "Hugging Face dataset", or:
cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-huggingface_dataset
pip install -r requirements.txt
Restart ComfyUI. The Basic data handling pack is a separate install - grab it too, since these converters are built around its Data List semantics.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| dataset | HUGGINGFACE_DATASET | Dataset to materialize (from the π€ Dataset Loader or another dataset node). | |
| column | STRING | When set, each item is that column's value instead of a whole row dict. | |
| limit | INT | -1-1β2147483647 | Max rows to materialize; -1 = all. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| rows | * | Data List of row dicts (or of a column's values), one item per row. |