Nodes/ComfyUI_MieNodes/Mie Loop Resume ๐Ÿ‘
ComfyUI Node

Mie Loop Resume ๐Ÿ‘

Rebuild a loop context from saved JSON

By MieMieeeeeยทCreated 2 years agoยทUpdated 28 days agoยท 225
Mie Loop Resume ๐Ÿ‘
    • loop_ctx
    โ—„loop_ctx_json{}โ–บ

    Worth saying up front: this one is plumbing. In the MieNodes menu it lives under ๐Ÿ‘ Loop / _internal, which is the author's way of telling you it's not a node you'd normally drop onto the canvas yourself. It takes a serialized loop context as a JSON string and rebuilds a live MIE_LOOP_CTX object from it. That's the entire function.

    Part of ComfyUI-MieNodes (ComfyUI_MieNodes), MieMieeeee's utility pack.

    What it's actually for

    The MieNodes loop system carries its whole state - index, count, the shared state bag, collected items - inside the loop_ctx object. Because that state can be serialized to JSON, a loop can be paused and picked back up rather than always starting from scratch. MieLoopResume is the reverse of that serialization: hand it the saved JSON, get back a context you can feed into the loop machinery.

    In normal use you don't wire this by hand - the equivalent lives on MieLoopStart as its resume_loop_ctx input, which is the front-door way to restart a loop from a saved state. MieLoopResume is the lower-level building block behind that, exposed for advanced or programmatic setups where you're reconstructing a context outside the usual Start flow.

    The inputs and outputs that matter

    • loop_ctx_json (STRING, default {}) - the serialized context. A default of {} gives you an empty context; a real saved blob restores a real loop's state.
    • loop_ctx (MIE_LOOP_CTX) - the rebuilt context object, ready to thread into the loop.

    There's nothing to tune here. It's a deserializer: JSON in, context out.

    Installing it

    ComfyUI Manager โ†’ search ComfyUI-MieNodes โ†’ install โ†’ restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MieMieeeee/ComfyUI-MieNodes
    

    then restart. The loop nodes need no model downloads or extra dependencies.

    Common issues

    I can't find it in the menu. It's tucked under ๐Ÿ‘ MieNodes โ†’ ๐Ÿ‘ Loop โ†’ _internal on purpose. If you're building a normal loop you almost certainly don't need it.

    My JSON doesn't restore correctly. The string has to be a context that MieNodes actually produced - you can't hand-write an arbitrary blob and expect a coherent loop. If you're just trying to restart a loop from a saved point, use MieLoopStart's resume_loop_ctx input instead; it's the supported path and far less fiddly.

    Passing {}. The default empty object gives you an empty context, not a resumed one. That's fine as a placeholder but it won't carry any prior state.

    Category๐Ÿ‘ MieNodes/๐Ÿ‘ Loop/_internal

    Inputs (1)

    NameTypeDefaultDescription
    loop_ctx_jsonSTRING{}โ€”

    Outputs (1)

    NameTypeDescription
    loop_ctxMIE_LOOP_CTXโ€”