create from items (data list)
Turn a pile of key-value pairs into a dict — the data list version
- item
- DICT
"create from items (data list)" builds a dictionary from a collection of key-value pairs, and it's the one to reach for when those pairs arrive as a ComfyUI data list - the native list type where each item gets processed individually. If you've ever had a workflow produce a pile of (key, value) tuples and wished you could just hand them all to a dict, this is the node.
Before you pick between this and its near-twin create from items (LIST), understand the pack's two list concepts. A data list is ComfyUI's native list: items flow through one at a time, which is what you want for batch processing and parallel work. A LIST is a single Python list object passed as one variable. This node eats the first; its sibling eats the second. Feed the wrong flavor and the port simply won't connect.
How it works
It takes a single required input, item (type *), and marks the node INPUT_IS_LIST, meaning ComfyUI hands it the whole batch of items at once. On execution it checks that every item is a two-element pair (a tuple or anything with length 2), then builds the dict with dict(items). Malformed input raises a clear "Each item must be a (key, value) pair" error rather than silently producing garbage.
Inputs and outputs
item(*) - the data list of key-value pairs. The one input that matters.- Output:
DICT- the assembled dictionary.
Because it's a data list, you can generate the pairs with a batch-style node that emits tuples - a text splitter, a regex find-all, another pack node that outputs items - and collect them here.
The gotcha that bites people
dict() is happy to accept tuples, and the check accepts anything with length 2 - including a two-character string like "ab", which would become {"a": "b"}. That's legal Python, just probably not what you meant. If your upstream data isn't structured as actual pairs, validate it first. Also note this is a collector, not a transformer: the pairs are taken as-is, so string pairs give you string keys and string values. If you need typed values (ints, booleans), the type-specific create nodes are the better fit.
Install
Ships in Basic data handling - pure Python, no dependencies, no model downloads. ComfyUI Manager → search "Basic data handling", or:
cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
then restart ComfyUI.
This one sees real use in shared workflows that collect metadata or prompt fragments and bundle them before a save node - the "gather everything, then package it" pattern. If you're new to it, the easiest way to get a feel is to feed it the items output of the pack's items node (the LIST variant) and watch pairs become a dict.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| item | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DICT | DICT | — |