Mie Loop Param Get Float ๐
Read the current loop value as a FLOAT
- loop_ctx
- FLOAT
The float twin of MieLoopParamGetInt. Inside a MieNodes loop, this node pulls the current iteration's value out of the loop_ctx as a FLOAT. It's the node you use when the thing you're sweeping is a decimal - a CFG value, a denoise strength, a LoRA weight, a schedule fraction.
Part of ComfyUI-MieNodes (ComfyUI_MieNodes), MieMieeeee's utility pack, under the ๐ Loop submenu.
Why you'd reach for it
This is where the loop system gets genuinely useful for tuning. Set up a MieLoopStart in float mode - either an explicit list like 0.4, 0.6, 0.8 or a range from a start to an end by a step - and use MieLoopParamGetFloat to feed each value straight into a sampler's cfg or denoise. One graph, one run, and you get an image at every setting instead of hand-editing the field and re-queuing five times. It turns a parameter sweep into a single loop.
How it works
Each pass, the loop's current value sits under a key in the context's state bag (default value). MieLoopParamGetFloat looks that key up and returns it as a float. Leave the key at value for the primary swept value, or set a custom key to read any float you seeded via initial_state_json or wrote back through MieLoopEnd's state_json.
The inputs and outputs that matter
loop_ctx(MIE_LOOP_CTX) - the loop context.key(STRING, defaultvalue) - which entry to read.valueis the current iterated float; a custom name reads something else from the state.default_value(FLOAT, default0) - the fallback when the key is missing, so a first pass or an unset key won't crash the graph.- Output
FLOAT- this pass's decimal value.
Installing it
ComfyUI Manager โ search ComfyUI-MieNodes โ install โ restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/MieMieeeee/ComfyUI-MieNodes
then restart. No model downloads or heavy dependencies. Under ๐ MieNodes โ ๐ Loop.
Common issues
Float rounding surprises. If you built your sequence in range mode with a step like 0.1, don't be shocked if a value reads back as 0.30000000000000004. That's ordinary floating-point, not a MieNodes bug - round it downstream if a node is picky about it.
I keep getting the default back. The key isn't matching. For the swept value, use value and make sure the loop's param_type is float. Custom keys have to match by exact spelling.
Wrong type for the loop. Looping over integers? Use MieLoopParamGetInt. Strings? MieLoopParamGetString. Grabbing a float from a loop that isn't producing floats just hands you the fallback.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| loop_ctx | MIE_LOOP_CTX | โ | |
| key | STRING | value | โ |
| default_value | FLOAT | 0.00 | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | โ |