Dictionary to Outputs π
Unbox a DICT into individual wires
- dictionary
- dictionary
- value_1
- value_2
- value_3
- value_4
Dictionary to Outputs is the escape hatch for ComfyUI's DICT type. ComfyUI's node graph is built on individual typed wires - an INT here, a STRING there - but a dictionary is one fat pipe carrying many values at once. That's great for moving a bundle of data in one wire, and useless until you can pry the values back out. This node does the prying.
How it works
Feed it a dictionary (the DICT output from the pack's Dynamic Dictionary, String to Dict, or anything else producing a compatible dict) and up to four key fields, and you get the dict back plus value_1 through value_4 as separate ANY outputs. The behavior is simple:
- Type a key name in
key_1,key_2, etc., and that output holds the value for that key. - Leave a key blank, and it falls back to pulling values sequentially from the dict's order.
So a dict of {"prompt": "...", "steps": 30, "seed": 42} with key_1 set to "prompt" gives you the prompt on value_1 without caring about dict order. Leave all keys blank and you just get the first few values in whatever order they were inserted.
The output_count slider (1β50, default 4) is where it gets flexible: the node dynamically resizes its own outputs to match. Bump it to 10 and you get ten value sockets. This is a genuinely handy trick - the node edits its own class definition at runtime so ComfyUI re-renders the correct number of outputs. It's technically a bit of a hack, but it works, and it's the kind of thing only a QoL utility pack attempts.
Where you'll use it
The typical pipeline: some node (an API response parser, a metadata reader, a multi-value utility) hands you a DICT, and you need the individual fields scattered across different parts of the graph - one value into a text field, another into a seed, another into a sampler setting. One Dictionary to Outputs replaces a pile of string-splitting and index gymnastics.
The outputs are typed * (ANY), so they'll plug into any socket. One caveat: a dict key that doesn't exist yields None on that output, so if your workflow silently produces nothing downstream, check that the key name matches exactly - including case and whitespace.
Install
It's part of drmbt/comfyui-dreambait-nodes. ComfyUI Manager, search "comfyui-dreambait-nodes"; or:
cd ComfyUI/custom_nodes
git clone https://github.com/drmbt/comfyui-dreambait-nodes
then restart ComfyUI. As with the rest of the pack, the install brings the full dependency list (transformers, bitsandbytes, librosaβ¦) even though this node is pure Python dict plumbing - the price of a grab-bag pack. If you're already in the pack for Dynamic Dictionary, this is its natural partner: build a dict, then unpack the fields you actually need.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| dictionary | DICT | β | |
| key_1 | STRING | β | |
| key_2 | STRING | β | |
| key_3 | STRING | β | |
| key_4 | STRING | β | |
| output_count | INT | 41β50 | β |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| dictionary | DICT | β |
| value_1 | * | β |
| value_2 | * | β |
| value_3 | * | β |
| value_4 | * | β |