Nodes/ComfyUI_Eugene_Nodes/Dictionary Update (5 pairs)
ComfyUI Node

Dictionary Update (5 pairs)

Fill Five Dictionary Keys in One Node Instead of Five

By JEONG-JIWOO·Created 2 years ago·Updated 8 months ago· 2
Dictionary Update (5 pairs)
  • input_dict
  • DICT
key1
value1
key2
value2
key3
value3
key4
value4
key5
value5

Dictionary Update (5 pairs) is DictUpdate1 with more slots. Where the single-pair node is the atom of Eugene's dictionary system, this is the everyday workhorse: one node, up to five key/value pairs, one dictionary out. You'll reach for it when your prompt's building blocks are a handful of stable values - subject, style, quality, lighting, negative - that you want defined in one place and referenced everywhere.

How it works

Exactly like the single-pair version, just looped. It takes an optional input_dict, copies it, and writes each provided pair into the copy: key1/value1 through key5/value5. Output is a single DICT.

The same two rules carry over, and they're what make the node forgiving to use:

  • Empty pairs are skipped. Any slot with an empty key or value just doesn't write. That means you can wire it with only two pairs filled and it behaves like a two-pair node.
  • No input dictionary is fine. Leave input_dict unwired and it starts fresh.

One practical note: only key1 and value1 are marked required in the schema, but they behave exactly like the optional ones - set them to "" and they're ignored. So don't feel obliged to use slot 1 first; use whichever slots you like and leave the rest blank.

Where it fits

Chain these together and you get a readable "constants block" at the top of your workflow: all your reusable tokens in one node, feeding a DictTemplate (or a LoRA loader's input_dictionary). It also composes with the bus nodes - drop the resulting dictionary into a DictBus's dict slot and the whole workflow carries it around.

Installing it

Same pack, no dependencies:

cd ComfyUI/custom_nodes
git clone https://github.com/JEONG-JIWOO/ComfyUI_Eugene_Nodes

Restart ComfyUI, or install via ComfyUI Manager (search "Eugene Nodes").

Where people get burned

The same custom-type reminder as the rest of the pack: the DICT output only plugs into nodes that accept this pack's dictionary type (DictTemplate, the loaders' input_dictionary, the bus's dict slot). And remember the empty-pair rule cuts both ways - if you deliberately want an empty string stored under a key, this node won't do it; it sees empty as "not set." Values also get whitespace-stripped on the way in.

Categorydictionary/core

Inputs (11)

NameTypeDefaultDescription
key1STRING
value1STRING
input_dictoptDICT
key2optSTRING
value2optSTRING
key3optSTRING
value3optSTRING
key4optSTRING
value4optSTRING
key5optSTRING
value5optSTRING

Outputs (1)

NameTypeDescription
DICTDICT