Get from Image Dict
Pull one named image back out of the bundle
- image_dict
- ImageDef
What it's for
The read half of this pack's ImageDict idea. Add to Image Dict bundles images into one dictionary on one wire; this node pulls one of them back out by name and hands you a normal IMAGE socket again.
Why bother? Because naming is a kind of routing. In a comparison workflow, "the reference", "the upscaled", "the mask preview" are three different images you built at three different places in the graph, and instead of dragging three wires across the canvas you address them by key where you need them. It's also the node that makes a saved bundle reusable: load a zip, then grab the one image inside it you actually want to re-process.
How it works
It's about as simple as a node gets: if the key exists in the dictionary, return it; otherwise return None. No default, no placeholder, no error.
The output socket is named ImageDef and typed IMAGE, so it wires anywhere a decoded image goes - VAE Encode, Save Image, an image compare, a ControlNet preprocessor.
Two behaviors worth holding onto:
- Keys are case-sensitive.
faceandFaceare different entries, and chaining severalAdd to Image Dictnodes with inconsistent capitalization is a very easy way to build a dict that "has no such key" while you're staring at it. - The node re-runs every queue. It declares its cache key as
float("NaN"), which is never equal to itself, so ComfyUI never considers it up to date. That's deliberate: the dict gets mutated by upstream nodes during execution, and a cached read would return stale contents. It's also the reason a small accidental dict chain can make a large workflow feel sluggish.
Inputs and outputs
key (a STRING widget) and image_dict (a forced ImageDict input - it must be wired; there's nothing useful to type here). One output: the image, or None.
Installing it
Ships in ComfyUI-TinyBee under 🐝TinyBee/Dicts. All dependencies are Python standard library per the README, requirements.txt is just pillow, and there are no model files.
cd ComfyUI/custom_nodes
git clone https://github.com/TinyBeeman/ComfyUI-TinyBee
Or find ComfyUI-TinyBee in ComfyUI Manager and restart. Note that the Dict/List nodes in this pack were migrated from the author's older ComfyUI-Nid pack and kept their original node names, so having both packs installed gives you duplicate registrations.
Where people get burned
The None return is the trap. A missing key does not raise here - it raises three nodes later, in whatever you wired the output into, usually as a NoneType complaint that says nothing about dictionaries. Nobody reads that error and thinks "ah, the key".
The most common way to get there is a key that was deleted rather than never added. Add to Image Dict removes a key when its image input is unwired, so unplugging one image mid-graph to compare outputs quietly deletes that entry. If a read that worked yesterday fails today, look for a loose wire on the write side before you edit key names.
And don't wire this to an empty dict and expect graceful degradation - an empty ImageDict (a fresh Add to Image Dict with no image wired anywhere in the chain) behaves exactly like a missing key, because it is one. If your bundle is built conditionally, the failing read is usually the condition you didn't check.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| key | STRING | — | |
| image_dict | ImageDict | [object Object] | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| ImageDef | IMAGE | — |