🗂️Dict → ControlNet🟢
ControlNet presets, as dict entries
- dict
- value
ControlNet is where ComfyUI graphs get genuinely hairy. A decent setup has a preprocessor, a loaded ControlNet model, an Apply node with strength and start/end values - and if you're running two or three ControlNets (depth + pose + maybe a tile pass), the wires multiply fast. DictExtractControlNet ("🗂️Dict → ControlNet🟢") is the extractor half of a trick that turns a pile of ControlNet wires into a dict keyed by role.
Store each ControlNet model in the bus under a descriptive key - cn_depth, cn_pose, cn_tile - and extract the right one at each Apply node. If you pair it with the rest of the pack, the whole ControlNet section becomes readable configuration: your preprocessors and models loaded once up top, keyed by what they do, extracted exactly where they apply. Swapping depth control from one model to another is then a one-line change at the top of the graph instead of a hunt through the middle.
What you set
- dict (required) - the dictionary to read from (non-empty).
- key - the slot name, e.g.
cn_depth. - cleanup_key (on by default) - normalizes the key.
Output: value as CONTROL_NET, wired into ControlNet Apply (or whatever Apply-style node your setup uses).
Honest notes
This node is really about organization, not capability - it can't fix a mismatched preprocessor or a controlnet model that doesn't suit your checkpoint. But it does fix the organizational half: knowing which ControlNet is being applied where, and changing your mind without rewiring the middle of the graph. The extractor validates the stored value is a genuine ControlNet, so a type slip surfaces here rather than as a confusing apply failure.
Also be aware the pack's dicts are immutable frozendicts, which is exactly what you want here - sharing one ControlNet model wire across two Apply nodes stays safe because nothing can mutate the shared reference. This one sits in the Models corner of the Extract menu, alongside CLIP, VAE, and LoRA.
Install
Standard for this pack - small, one lightweight dependency (frozendict), no model downloads (the ControlNet itself comes from a ControlNet Loader). ComfyUI Manager: search "Dict Tools". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Lex-DRL/ComfyUI-DictTools
Restart ComfyUI. Needs 0.18.0+ (newer extension API); if the nodes are missing after install, update ComfyUI before anything else. Missing keys still hard-error with "No such key in Dict" - keep your ControlNet slot names consistent and you'll never stare at a silent empty wire again.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| dict | DICT | A Dictionary to work with. | |
| key | STRING | Key (name) of the item extracted from the dict. | |
| cleanup_key | BOOLEAN | true | Automatically remove leading/trailing spaces and extra newlines from the key. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | CONTROL_NET | The actual ControlNet-type item extracted from the Dict. |