Nodes/ComfyUI Inspire Pack/Is Cached (Inspire)
ComfyUI Node Runs on cloud

Is Cached (Inspire)

Check whether backend data exists before you load it

By ltdrdata·Created 3 years ago·Updated 9 months ago· 805
Is Cached (Inspire)
    • BOOLEAN
    key

    This is a small helper from the Inspire Pack's Backend Cache system, and it does exactly what the name says: it tells you whether something is stored under a given key. Returns a boolean. On its own that's not exciting - it earns its keep as the "should I bother?" check in front of a load-or-compute branch.

    To get why it exists, you need the cache it belongs to. Inspire's Backend Cache lets you stash arbitrary data - a loaded checkpoint, a latent, some intermediate result - in memory under a string key, and pull it back later, even across different workflows in the same ComfyUI session. Cache Backend Data puts something in, Retrieve Backend Data pulls it out, and Is Cached answers the question that comes before both: is it there yet?

    How it works

    You give it a key. It looks in Inspire's backend cache and returns true if data lives under that key, false if not. Per the pack's docs, that's the whole behavior - it's a existence check, nothing more.

    Where it's genuinely useful is conditional logic. Say you've got an expensive step you only want to run once and reuse afterward. You check Is Cached; if the answer is false, you run the step and cache the result; if it's true, you skip straight to retrieving it. Combined with a switch/branch node, that turns the cache into a proper compute-once pattern instead of blindly re-running or blindly re-loading.

    The inputs and outputs

    • key (STRING) - the cache key to look up. It has to match the key you cached under, exactly.
    • Output is a single BOOLEAN - true if present, false if not.

    That's the entire node. No options.

    How to install it

    ComfyUI Manager is the easy route: Install Custom Nodes → search ComfyUI Inspire Pack → install → restart. Or clone it directly:

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

    Then restart. Inspire Pack is Dr.Lt.Data's - the same author as ComfyUI Manager and Impact Pack - so it's dependable and installs without fuss. No model downloads for this node.

    Common issues

    The gotcha is the cache's lifetime. Inspire's backend cache is a live, in-memory store - it exists only while ComfyUI is running, and it's populated by cache nodes earlier in your run (or a previous run in the same session). Restart ComfyUI and Is Cached will report false for everything, because the cache started empty. So it's not persistence across restarts; it's reuse within a session. The other easy miss is a key typo - the lookup is exact-match, so ckpt_1 and ckpt1 are different keys, and a mismatched key just reads as "not cached" with no error to warn you.

    CategoryInspirePack/Backend

    Inputs (1)

    NameTypeDefaultDescription
    keySTRING

    Outputs (1)

    NameTypeDescription
    BOOLEANBOOLEAN