Pyobjects/Dict Items
Get a dict's key-value pairs as a list
- py_dict
- LIST
DictKeysNode gives you the keys, DictValuesNode gives you the values - DictItemsNode gives you both together, as a list of key/value pairs, the same way Python's dict.items() does. It's the node you reach for when you need to iterate over a dict's full contents rather than just one side of it.
It's part of the Dict* family in ComfyUI-LogicUtils, a data-manipulation pack by GitHub user aria1th - publicly known as AngelBottomless, the trainer behind Illustrious XL, though this side of the pack is unrelated to that training work. These nodes expose ordinary Python dict operations as ComfyUI graph nodes, built for people assembling programmatic or config-driven workflows. The pack is candid about being lightly documented - the README's own line is "proper documentation is being prepared, however there are too many nodes" - so the schema and a bit of testing are your best guide to exact behavior.
How it works
Wire in py_dict, and the node returns a LIST of that dict's key/value pairs - the same shape you'd get from calling .items() on a Python dict. It's most useful when a downstream node or loop needs to process both the key and its value together, rather than handling them as two separate lists you'd have to keep aligned yourself (which is the risk with pulling DictKeysNode and DictValuesNode separately - nothing guarantees the two lists stay in matching order if the dict changes between calls).
Like the rest of the Dict* nodes, this one is flagged as an output node in ComfyUI's execution model, so it runs even if nothing downstream is wired to consume its result - handy for a quick check of a dict's full contents mid-build.
The inputs and outputs that matter
py_dict(DICT, required) - the dict to read from.- Output: a single
LIST- the key/value pairs currently in that dict.
How to install it
Through ComfyUI Manager: search ComfyUI-LogicUtils, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/aria1th/ComfyUI-LogicUtils
Restart ComfyUI afterward. No model files involved - pure Python data handling. The README's opt-in auto-install hook (COMFYUI_LOGICUTILS_AUTO_INSTALL=1, disable with COMFYUI_LOGICUTILS_SKIP_INSTALL=1) targets other, heavier nodes in the pack; this one doesn't need it.
Common issues & troubleshooting
Fewer pairs than expected, or missing entries. Same root cause as with the other Dict* read nodes: it usually traces back to a DictSetNode chain that wasn't threaded correctly - each DictSetNode needs to feed its output DICT into the next one's py_dict input, or you end up with several separate dicts instead of one fully populated one.
Not sure if you want this or DictKeysNode/DictValuesNode. If a downstream step needs to process both key and value in lockstep - building a report, matching against another list, that kind of thing - use this one. If you only care about one side, the dedicated keys- or values-only node is simpler to work with.
Output shape doesn't match what a downstream node expects. This node returns pairs bundled together in a list, not two parallel lists - if something downstream expects keys and values as separate inputs, you'll need to unpack this list rather than wiring it directly, or use DictKeysNode and DictValuesNode instead.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| py_dict | DICT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LIST | LIST | — |