Get Dict Float
Pull a decimal value out of a dict
- DICT
- FLOAT
Get Dict Float pulls a float - a decimal number - out of a DICT by name. In generation workflows the floats worth carrying around are the settings: cfg, denoise strength, LoRA weight, a blur radius, an upscale factor. Stash one under a key early on and this node hands it back wherever a downstream node needs that exact value, so you set it once instead of re-typing it into three different widgets.
That "set once, use everywhere" is the real reason to route a number through a dict. When the same denoise value feeds a base pass and a refiner pass, keeping it in the shared bag means one edit changes both. Scatter it across widgets and you'll inevitably update one and forget the other. The dict becomes a little settings sheet your whole graph reads from.
How it works
It's a typed Get Dict, and the README describes the family: it works like the plain Get Dict but with an optional default and type validation. Ask for a key, and if it holds a real number you get it; if the key's missing or the stored value isn't a float, you get the default instead. Leave the default off and the automatic fallback for this type is 0.
The inputs and outputs that matter
- key (required, text) - the name the float was stored under. Match the Set Dict key exactly.
- DICT (required) - the bag to read from.
- default (optional, default 0) - the fallback if the key is missing or the wrong type. For a float,
0is often not a safe default (a cfg of 0 or a denoise of 0 does something specific), so set this deliberately.
One output: FLOAT. Wire it into any float input - cfg, denoise, strength, radius.
Installing it
Pure Python, no weights, nothing heavy - quick install. ComfyUI Manager → Install Custom Nodes → search "antrobots ComfyUI Nodepack" → Install → restart, or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/antrobot1234/antrobots-comfyUI-nodepack
then restart. It's under antrobots-ComfyUI-nodepack/dicts/get.
Common issues
Watch the automatic default of 0. Because a missing key silently yields 0, and 0 is a legitimate-but-drastic value for a lot of float settings (a denoise of 0 skips sampling; a cfg of 0 drops guidance entirely), a mistyped key can quietly wreck a generation without any error. Always set a meaningful default for floats rather than trusting the automatic zero.
Type validation is the other quiet path: store a string that looks like a number under that key and, because it isn't actually a FLOAT, the node returns the default, not the string's value. Keep types honest at the Set end. And the DICT input is required, keys are case-sensitive strings, and typos fail silently - check spelling first when a value looks wrong. Solo pack; real bugs go to the GitHub issue tracker the author welcomes.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| key | STRING | — | |
| DICT | DICT | — | |
| defaultopt | FLOAT | 0.00 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | — |