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

🗂️Dict → Upscale🟢

Keep your upscaler of choice in the bus

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

The model extractor for your upscale stage

Dict → Upscale🟢 is one of the model-type extract nodes in 🗂️ Dict Tools. It pulls an upscale model back out of a dict, ready to hand to an ImageUpscaleWithModel or an Ultimate SD Upscale-style step.

Here's the scenario that makes it worth having. In ComfyUI you often end up with several upscale paths in one workflow - a fast ESRGAN-family model (4x-UltraSharp, Remacri, RealESRGAN) for the "just make it bigger" case, maybe a latent or tiled pass for the detail stage. If you're running a bus-style workflow where the choice of upscaler is data flowing through the graph rather than a fixed node, you store the model once in a dict and extract it wherever the upscale actually happens. One connection carries the decision instead of a dozen hardwired wires.

How it works

Same shape as every Dict Tools extract node: dict[key] with a type check. The value stored under the key has to actually be an upscale model (UPSCALE_MODEL), otherwise execution fails rather than trying to bend the type.

The inputs that matter:

  • dict - the DICT you're pulling from.
  • key - the exact name the upscale model was stored under.
  • cleanup_key - on by default; strips spaces and extra newlines from the key you type.

The value output is an UPSCALE_MODEL wire. Note what this is not: it's not the model file, and you don't get it from this node in the first place. The actual weights still live in models/upscale_models as usual - a DictAddUpscale node up front stores a pointer to the loaded model, and this node hands that pointer back at the other end. No model downloads are involved in the pack itself.

Installing it

Part of the whole pack - ComfyUI Manager, search Dict Tools (Lex-DRL/ComfyUI-DictTools):

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

Restart ComfyUI after. The only pip dependency is frozendict, and there are no heavy installs or model files to fetch. The pack needs ComfyUI >= 0.18.0 (newer node API); if the nodes don't appear in the menu after installing, update ComfyUI itself.

Where people get burned

Two mistakes show up most. First, type mismatch: if whatever you stashed under that key isn't an upscale model - say you accidentally used a generic Any add - the strict type check on extraction will error out. Second, the usual key problem: case-sensitive lookup and a No such key in Dict error when the key doesn't match what you typed in the Add node. cleanup_key rescues you from stray spaces in the box, but not from mismatched names.

It's a small node with one job, and honestly it's only useful if you already bought into bussing your workflow. If you're still hardwiring everything, you don't need it. If you're not - this is the piece that lets the upscale stage stay a decision, not a pile of wires.

Category🗂️ Dict Tools/Extract/Models

Inputs (3)

NameTypeDefaultDescription
dictDICTA Dictionary to work with.
keySTRINGKey (name) of the item extracted from the dict.
cleanup_keyBOOLEANtrueAutomatically remove leading/trailing spaces and extra newlines from the key.

Outputs (1)

NameTypeDescription
valueUPSCALE_MODELThe actual Upscale-type item extracted from the Dict.