Nodes/ComfyUI-Loopchain/LatentStorageImport
ComfyUI Node Runs on cloud

LatentStorageImport

LatentStorageImport, the write-only storage node

By Fannovel16·Created 3 years ago·Updated 3 years ago· 31
LatentStorageImport
  • latent
    key

    The latent version of the pack's write-only collector. LatentStorageImport takes a LATENT tensor and appends it to a named slot in memory, giving you a way to accumulate samples across multiple graph executions. It has no outputs - it's an output node in the ComfyUI sense, meaning it sits at the end of a branch and just does a side effect.

    When you reach for it

    In a keyframe/loop pipeline you often want to collect samples before decoding - from the KSampler's LATENT output or after a VAEEncode - and then feed them back into a second diffusion pass in slices. That's this node's job: each time it runs, it pushes its input onto GLOBAL_LATENT_STORAGE[key], a Python list on the server. Run it for five frames and the bucket holds five latents; LatentStorageExportLoop reads them back later, batched, with loop indexes.

    Because it returns float("nan") from IS_CHANGED, ComfyUI never caches it - it re-executes every run, which is exactly what you want for a collector. Miss that detail and caching would silently swallow frames.

    Inputs

    • key - bucket name, exact and case-sensitive. This is the only thing that ties it to the export side, so keep it consistent.
    • latent - the LATENT tensor to append.

    No other knobs. Every execution appends once.

    The honest caveats

    Storage is in-memory on the ComfyUI server: a restart wipes everything, so import and export must live in the same session. Duplicates are easy - re-run the import branch and you've doubled the bucket - so pair this with a reset somewhere in the workflow. And a reminder about the pack's status: it's Fannovel16's small, experimental, effectively-dormant Loopchain (last commit late 2023), useful more as a pattern for how to loop and store in ComfyUI than as polished tooling. Install is the lightest kind - ComfyUI Manager, search "ComfyUI-Loopchain", or clone https://github.com/Fannovel16/ComfyUI-Loopchain into custom_nodes - no Python dependencies, no models to download.

    CategoryLoopchain/storage

    Inputs (2)

    NameTypeDefaultDescription
    keySTRING
    latentLATENT

    Outputs (0)

    No outputs