LatentStorageReset
LatentStorageReset, and the crash hiding in the shipped code
- pipeline
LatentStorageReset is supposed to be the latent twin of ImageStorageReset: one node that empties your named latent buckets from memory. In the version that ships in this pack, though, there's a wrinkle - the execute function references a variable it never defines (key = key.strip() where key doesn't exist), so running it throws a NameError: name 'key' is not defined every single time. Yes, really. This is a small, dormant project and that bug shipped.
So before anything else: if you try this node and it errors, it's not you. That's a known defect in the repo, not something you misconfigured.
What it was meant to do
Identical in shape to ImageStorageReset: one key_list input (multiline string, default *), no outputs, marked as an output node, with a frontend Queue button. The intent is to delete keys from GLOBAL_LATENT_STORAGE, the in-memory dict where LatentStorageImport accumulates samples. * was meant to clear all latent buckets; typing specific keys was meant to clear just those.
What to actually use instead
Given the crash, your options for clearing latent storage:
- Restart ComfyUI. All storage - image and latent - is a Python global in the server process, so a restart empties everything. Blunt, but guaranteed.
- Use
ImageStorageResetwith*to clear the image side, and be aware latent storage still lingers until restart. - Patch the node yourself - it's a two-line fix in
nodes/storages.py(delete the straykey = key.strip()line). If you're comfortable editing custom node code, that's the clean path, and it's exactly the kind of thing the pack's status as an unmaintained experiment invites.
The storage model underneath is the same as the image side: RAM-only, session-scoped, gone on restart. In a loop workflow you generally reset before re-importing, because re-running a LatentStorageImport appends to the existing bucket and doubles your sample count.
Install is dependency-free - ComfyUI Manager (search "ComfyUI-Loopchain") or clone https://github.com/Fannovel16/ComfyUI-Loopchain into custom_nodes, then restart. This pack is worth knowing for its loop-and-store idea - Fannovel16's animation loopchain concept - but treat every node in the storage family as experimental, and this one in particular as broken out of the box.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| key_list | STRING | * | — |
| pipelineopt | LOOPCHAIN_PIPELINE | — |
Outputs (0)
No outputs