Nodes/🗂️ Dict Tools/⚪LoRA → Dict🗂️
ComfyUI Node

⚪LoRA → Dict🗂️

Stack Your LoRAs Into the Bus

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

LoRAs are small adapter files that stack on top of a checkpoint to pin down a style, a character, or a concept - and in a serious workflow you often have several, applied in sequence with different strengths. DictAddLora stores a loaded LoRA (the LORA_MODEL object, not the filename) into your dict under a named key, so your whole LoRA stack can ride the bus.

It's grouped under Add/Models like the other model types, and the value is a wired input from a LoRA Loader. It's validated against the loaded-LoRA type before storage - you can't stash a raw file path here, and you wouldn't want to.

How it works

Standard Dict Tools mechanics: validate, store under the key, return a new frozendict (input never mutated), sort keys alphabetically on update. The LoRA object is held by reference, so bundling it costs no meaningful memory.

Where this genuinely helps: the pack's README pushes a "base dict then override dict" pattern, and LoRA stacks are a natural fit. Build a default stack in one dict, an override stack in another, apply the second to the first - and a whole character/style setup swaps in with a single connection instead of a rewiring session.

The inputs that matter

  • key (STRING) - the name you'll fetch the LoRA 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 (LORA_MODEL, optional) - the wired, loaded LoRA from a LoRA Loader.

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

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.

Two things to keep straight. First, this stores the loaded LoRA object - the strength you apply is a property of the application node, not this one, so keep strengths with the applier. Second, remember the snapshot rule: a LoRA that's been applied to a model is a different object from the pristine one; re-add if the bus should carry the patched version. The type check is strict, and the error message is unambiguous 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.
valueoptLORA_MODELThe actual LoRA-type item to add into the Dict.

Outputs (1)

NameTypeDescription
dictDICT