Nodes/ComfyUI_zura_nodes/Zura Load Video Latent Data
ComfyUI Node

Zura Load Video Latent Data

Split a huge graph in two and stop re-encoding for free

By ZURAVFX·Created about a month ago·Updated a day ago· 2
Zura Load Video Latent Data
    • samples
    ◄cache_key►
    ◄cache_digest►

    ComfyUI's cache is good, and it is not a save button. Close the app, come back, and your carefully prepared video latent is gone - which means re-encoding every frame of a long clip just to get back to where you were. This node is the save-button half of that pair: it reads back a latent someone wrote to disk so a second graph section can sample it later.

    What problem it actually solves

    Long video graphs have a natural fault line. Everything before sampling - decode, mask, detect, track, encode, prepare control - is deterministic and boring and takes minutes. Everything after sampling is where you iterate: seed, steps, prompt, control strength. Splitting those into two runs means you can spend an evening changing the seed without re-encoding the source each time.

    The node's own description is careful about scope: "Loads the prepared video latent on CPU. Connect it to the native sampler or VAE decode section." No models run here. No inference. It's a file read.

    How it works

    The cache lives under your ComfyUI output directory at output/zura/latent_data/<key>.safetensors, where <key> is the 64-character lowercase hex string you typed into cache_key. That's not decorative - the node rejects anything that isn't exactly 64 lowercase hex characters, so use the key Zura Save Video Latent Data gives you rather than making one up. A uuid4 hex string is the intended kind of value.

    On load it re-reads the file, hashes the raw bytes, and - if you wired the optional cache_digest - compares that against the digest the save node returned. Mismatch means someone rebuilt or replaced the cache under the same key, and you get "Video latent cache digest does not match. Rebuild it from the native preparation section." rather than silently sampling stale preparation.

    IS_CHANGED hashes the cache file's contents, so editing or replacing the file invalidates the ComfyUI cache for this branch automatically - one of the few places a loader does the right thing without ceremony.

    The returned latent is explicitly moved to CPU, and the docs say why: the safetensors parser returns CPU tensors and the node keeps that as a contract rather than assuming. Samplers handle the move themselves.

    Inputs and outputs

    • cache_key - STRING, default empty. The 64-hex key from the save node.
    • cache_digest (optional) - STRING, default empty. The save node's cache_digest output. Wire it; the verification is free.
    • samples - LATENT, into your sampler or VAE decode.

    Install

    cd ComfyUI/custom_nodes && git clone https://github.com/ZURAVFX/ComfyUI_zura_nodes
    pip install -r ComfyUI_zura_nodes/requirements.txt
    

    Restart. safetensors ships with ComfyUI already, so there's nothing extra. Note the file lives inside output/ - if you have a habit of wiping output between sessions, you're also wiping the cache, and there's no way to point it elsewhere.

    Common issues

    "Video latent cache is missing. Rebuild it from the native preparation section." The file isn't there: wrong key, wiped output folder, or you ran the load half of the graph before the save half.

    "Cache key must be exactly 64 lowercase hexadecimal characters." You typed test1. Generate one:

    python -c "import uuid; print(uuid.uuid4().hex)"
    

    "This cache key already contains different video latent data. Use a new cache key." You re-ran preparation with the same key after the preparation changed - different frames, different mask, different resolution. Same key now means two different things, which is exactly the situation the check exists to prevent. Either keep the old cache or mint a new key. Be honest with yourself here; reusing a key across variants is how you end up sampling one render's preparation against another's expectations.

    "Provide one native video LATENT dictionary to the cache node." You're trying to cache a latent with extra metadata, or one that isn't purely video. The format accepts samples plus an optional noise_mask and nothing else - five dimensions, floating point, finite, mask values in 0–1, under 256 MiB. So an H3 nested audio-video latent won't fit here; this is for the plain video latents.

    CategoryZura/Artist Studio/Data

    Inputs (2)

    NameTypeDefaultDescription
    cache_keySTRING—
    cache_digestoptSTRING—

    Outputs (1)

    NameTypeDescription
    samplesLATENT—