Nodes/🗂️ Dict Tools/🗂️Dict → float
ComfyUI Node

🗂️Dict → float

Every denoise, strength, and CFG, in one place

By Lex-DRL·Created 4 months ago·Updated 4 months ago· 1
🗂️Dict → float
  • dict
  • value
◄key—►
â—„cleanup_keytrueâ–ş

Floats are the knob values of ComfyUI - denoise, CFG, LoRA strength, controlnet strength, upscale amount, you name it. In a multi-pass workflow those knobs are scattered across a dozen nodes, and finding "where did I set denoise for pass 2" means clicking through half the graph. DictExtractFloat ("🗂️Dict → float") is how you pull those numbers out of a settings dict instead.

The pattern: at the top of your workflow, a row of DictAddFloat nodes with keys like denoise_pass1, cfg, lora_strength. Each KSampler, LoRA loader, and strength input reads its value from the dict via DictExtractFloat. Your tuning settings end up in one readable block - a config file rendered as nodes - and you stop digging through the graph to find the one slider you need to move.

What you set

  • dict (required) - the dictionary to read from (non-empty).
  • key - the knob's slot name.
  • cleanup_key (on by default) - normalizes the key.

Output: value as a float, wired into any FLOAT input - denoise, CFG, strengths, whatever takes a number.

Why it's better than it sounds

The payoff is real but specific: it's a settings-bus pattern, not a magic one. If you're the kind of person who tweaks a graph by directly nudging values where they sit, this adds a hop for no gain. But if you have a workflow with five passes and you find yourself re-tuning the same denoise/CFG set every run, centralizing them into a dict turns tuning into a two-second edit at the top. Combined with the base-then-override idea the author pushes - build one dict of defaults, apply an override dict later - you get something close to presets for whole sets of settings.

The extractor type-checks on the way out: whatever you stored under the key must genuinely be a float, so if you accidentally stored a string or an int, you get a clear error instead of a sampler doing something weird with a non-number. That's the pack's strictness paying for itself.

Install

Same as every node in this pack - small, one lightweight dependency (frozendict), no models. 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 don't appear after install, update ComfyUI first. And yes, missing keys hard-error with "No such key in Dict" rather than defaulting silently; with settings, you want that loudness.

Category🗂️ Dict Tools/Extract

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
valueFLOATThe actual float-type item extracted from the Dict.