Nodes/🗂️ Dict Tools/🟢ControlNet → Dict🗂️
ComfyUI Node

🟢ControlNet → Dict🗂️

Bundle Your ControlNet Into the Bus

By Lex-DRL·Created 4 months ago·Updated 4 months ago· 1
🟢ControlNet → Dict🗂️
  • dict
  • value
  • dict
key
cleanup_keytrue

ControlNet is how you pin composition - edges, depth, pose - to an image instead of hoping the prompt gets you there. If you're running one, it's another object off the loader that needs to reach the sampler, and in a busy graph it tends to be the wire that goes missing. DictAddControlNet tucks the loaded ControlNet into your dict under a named key so it travels with the rest of the pipeline state.

It's one of the model-family Add nodes, and the CONTROL_NET value is a wired input from your ControlNet Loader. It's validated against the actual ControlNet type before storage - you can't accidentally store an image there.

How it works

Same Dict Tools engine as the whole pack: validate, store under the key, return a new frozendict without mutating your input, sort keys alphabetically on update. The ControlNet object is held by reference, so bundling it costs no meaningful memory.

The workflow that makes this click: a multi-stage or regional workflow where different ControlNets apply at different points. Park them all in one dict with distinct keys, extract the one you need at each stage, and you've replaced a fan of wires with a single connection.

The inputs that matter

  • key (STRING) - the name you'll fetch the ControlNet back by.
  • cleanup_key (BOOL, default on) - trims spaces/newlines from the key.
  • dict (DICT, optional) - an existing dict to extend, or empty to start one.
  • value (CONTROL_NET, optional) - the wired ControlNet from its loader.

Output is dict (DICT). Get it back with DictExtractControlNet.

Install

ComfyUI Manager: search Dict Tools, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/Lex-DRL/ComfyUI-DictTools

Restart after. Only dependency is frozendict, auto-installed by Manager.

Gotchas

Pack-wide: needs ComfyUI 0.18.0+ (newer node API). Failed to load → update ComfyUI.

ControlNet-specific thing to keep straight: the dict holds the loaded model, not the conditioning image or the strength value. Those still live elsewhere - this node is purely about carrying the model object to wherever you apply it. And the snapshot rule applies: if you stack a second ControlNet or apply patches, re-add the result if you want the bus to carry the updated object. The type check is strict and will yell at you if you wire the wrong thing.

Category🗂️ Dict Tools/Add/Models

Inputs (4)

NameTypeDefaultDescription
keySTRINGKey (name) of the item inserted into the dict.
cleanup_keyBOOLEANtrueAutomatically remove leading/trailing spaces and extra newlines from the key.
dictoptDICTAn (optional) Dictionary to work with.
valueoptCONTROL_NETThe actual ControlNet-type item to add into the Dict.

Outputs (1)

NameTypeDescription
dictDICT