Nodes/ComfyUI Inspire Pack/Retrieve Backend Data (Inspire)
ComfyUI Node Runs on cloud

Retrieve Backend Data (Inspire)

Pull cached data back by string key

By ltdrdata·Created 3 years ago·Updated 9 months ago· 805
Retrieve Backend Data (Inspire)
    • data
    key

    This is the "get it back out" half of Inspire's Backend Cache. You stashed something earlier with Cache Backend Data under a string key; Retrieve Backend Data pulls it back using that same key. It's the read side of a tiny in-memory key-value store bolted onto ComfyUI, and the whole point is not recomputing things you already have.

    Why would you want that? A few real cases: reuse a loaded checkpoint or a heavy intermediate across different workflows without reloading; pass data between graphs in the same session; or build a compute-once pattern where you generate something expensive, cache it, and retrieve it on later runs instead of regenerating. It's the kind of plumbing you don't need until you suddenly do, and then it's very handy.

    How it works

    Inspire keeps a backend cache - a dictionary living in memory while ComfyUI runs - where cache nodes store data under keys. Retrieve Backend Data takes a string key, looks it up, and outputs whatever's there. Because the cache can hold anything, the output is a wildcard type - it'll be whatever you cached (a MODEL, a LATENT, an IMAGE, a list), and you wire it into whatever node consumes that type. The output is delivered as a list, which matters if the node downstream expects list-style input.

    The key thing to hold onto: this is session memory, not disk. It survives across workflow runs while ComfyUI stays up, but a restart wipes it. It's about reuse within a session, not persistence.

    The inputs and outputs

    • key (STRING) - the exact key you cached the data under. Must match; the lookup is literal.
    • Output is data - a wildcard (*) list output carrying whatever was stored. Connect it to the node that expects that data type.

    There's nothing to configure beyond the key. Its partner nodes are Cache Backend Data (write) and, if you want to guard against a miss, Is Cached (check existence first).

    How to install it

    ComfyUI Manager: Install Custom Nodes → search ComfyUI Inspire Pack → install → restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ltdrdata/ComfyUI-Inspire-Pack
    

    Then restart. The pack is Dr.Lt.Data's - dependable, clean install, no model downloads for this node.

    Common issues

    The number-one failure is a cache miss: retrieving a key that was never cached, or that got wiped by a ComfyUI restart, since the cache is memory-only and starts empty each launch. If a workflow relies on retrieving data, the caching node has to have run in the same session first. Guard it with Is Cached (Inspire) when you're not sure. Second, keys are exact-match strings - a typo silently fails to find your data. And because the output type is a wildcard, ComfyUI can't type-check the connection for you; if you wire cached IMAGE data into a node expecting a LATENT, you'll only find out at runtime.

    CategoryInspirePack/Backend

    Inputs (1)

    NameTypeDefaultDescription
    keySTRING

    Outputs (1)

    NameTypeDescription
    data*