Mie Loop Param Get Bool ๐
Read a boolean flag out of the loop state
- loop_ctx
- BOOLEAN
The boolean member of the loop getter family. Inside a MieNodes loop, this node reads a true/false flag out of the loop_ctx state bag by name and hands it back as a BOOLEAN.
Part of ComfyUI-MieNodes (ComfyUI_MieNodes), MieMieeeee's utility pack, under the ๐ Loop submenu.
How it differs from the others
Worth being precise here, because it's easy to misread. MieLoopStart's param_type only offers int, float, string, and json - there's no bool iteration mode. So unlike ParamGetInt or ParamGetString, which usually read the primary iterated value, MieLoopParamGetBool is really a state-bag flag reader. It pulls a boolean you put into the loop's shared state - via MieLoopStart's initial_state_json, or written back each pass through MieLoopEnd's state_json.
That makes it the natural node for carrying a condition across iterations. Think "have we hit a good-enough result yet," "should this pass skip the upscale," "is this the warm-up run." You set the flag somewhere in the loop, read it here, and branch on it downstream.
The inputs and outputs that matter
loop_ctx(MIE_LOOP_CTX) - the loop context.key(STRING, defaultvalue) - the name of the flag to read. You'll almost always set this to something meaningful likeconvergedorskip_step, since the defaultvaluekey normally holds the iterated payload, not a bool.default_value(BOOLEAN, default false) - what you get if the key isn't set yet. Sensible: on the first pass, before anything has written the flag, you fall back tofalse.- Output
BOOLEAN- the flag's current 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
It's always false. Two usual causes: the key doesn't match the name you wrote the flag under, or nothing ever wrote it and you're seeing the default_value. Booleans have to be put into the state first - via initial_state_json on Start or state_json on End - before this node can read anything but the fallback.
I wanted first/last-iteration logic. Don't hand-roll that with a bool. Use MieLoopIfIsFirst / MieLoopIfIsLast, which know the loop's position directly.
Leaving the key at value. That default collides with where the iterated payload usually lives. Give your flag its own key so you're not reading the loop's current item and trying to coerce it to a bool.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| loop_ctx | MIE_LOOP_CTX | โ | |
| key | STRING | value | โ |
| default_value | BOOLEAN | false | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | โ |