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

Retrieve Backend Data [NumberKey] (Inspire)

Pull cached data by number key

By ltdrdata·Created 3 years ago·Updated 9 months ago· 805
Retrieve Backend Data [NumberKey] (Inspire)
    • data
    key0

    Same job as Retrieve Backend Data, but keyed by a number instead of a string. This is the read side of Inspire's Backend Cache, and the NumberKey variant exists for one clear reason: automation. When you're generating keys in a loop or driving them off a counter, integers are far easier to produce and increment than strings. So if your caching is programmatic, this is the retrieve node that fits.

    The cache itself: Inspire keeps an in-memory key-value store alive while ComfyUI runs, where you can park arbitrary data - a checkpoint, a latent, an intermediate result - and pull it back later, including across different workflows in the same session. Cache nodes write, retrieve nodes read. This one reads by number.

    How it works

    You give it an integer key; it looks up the backend cache and outputs whatever was stored there. Because the cache holds any type, the output is a wildcard - it comes out as whatever you put in (MODEL, LATENT, IMAGE, a list) and you wire it into the node that consumes that type. The output is delivered as a list, which matters when the downstream node expects list input.

    The important mental model: this is session memory, not disk storage. Data persists across workflow runs as long as ComfyUI stays up, but a restart clears the whole cache. It's reuse within a session, full stop.

    The natural pairing is with a List Counter or any integer source that walks keys - cache under number 0, 1, 2... in one pass, retrieve by the same numbers later. That's the loop-friendly pattern the NumberKey nodes are built for.

    The inputs and outputs

    • key (INT) - the numeric key to look up. Must match what you cached under.
    • Output is data - a wildcard (*) list carrying the stored value. Connect it to whatever expects that type.

    Its companions are Cache Backend Data [NumberKey] (write) and Remove Backend Data [NumberKey] (clear). For string keys, use the plain Retrieve Backend Data instead.

    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. Inspire Pack is Dr.Lt.Data's - reliable, clean install, no model downloads for this node.

    Common issues

    The usual failure is a cache miss - retrieving a number that was never cached, or one wiped by a restart, since the cache is memory-only and resets each launch. The writing node has to have run in the same session. Second, keys don't mix types: data cached under the string "5" is not the same slot as the number 5, so use the NumberKey cache and retrieve nodes together, not one of each. And because the output is a wildcard, ComfyUI can't validate the connection type ahead of time - mis-wire it and the error only shows at runtime.

    CategoryInspirePack/Backend

    Inputs (1)

    NameTypeDefaultDescription
    keyINT00–18446744073709550000

    Outputs (1)

    NameTypeDescription
    data*