Nodes/ComfyUI FSL Nodes/FSL / Image Memory → Clear All
ComfyUI Node

FSL / Image Memory → Clear All

FSL / Image Memory → Clear All — the 'start over' button for the image stash

By fredlef·Created about a year ago·Updated 9 months ago· 13
FSL / Image Memory → Clear All

      The nuclear option of the FSL memory family. FSLImageMemoryClearAll wipes the entire in-process image stash - every key that FSLImageMemoryStore ever wrote - in one shot. No inputs, no outputs, no key to type. It's the "start over" button, and it exists because the memory dict never forgets on its own: images persist across runs until something deletes them, so when you're switching between projects or debugging an iterative workflow, a full reset is often the fastest way to stop yesterday's state from contaminating today's.

      How it works

      Dead simple under the hood: it calls .clear() on the pack's global _MEM dict and prints [FSLImageMemoryClearAll] cleared all memory to the console. That's the entire implementation. It's registered as an output node with RETURN_TYPES = (), meaning it runs for its side effect and produces nothing.

      The important distinction from its sibling:

      • FSLImageMemoryClear removes one key (_MEM.pop(key)).
      • FSLImageMemoryClearAll removes everything (.clear()).

      If you have several keys in flight - say "last" for the main loop plus a couple of reference images for different branches - Clear is surgical, Clear All is a blunt instrument. Most of the time you want the surgical one; Clear All is for when the whole stash is suspect.

      When to use it

      Three situations where it earns its keep:

      1. Starting a new project. The stash is global, so project A's stored images can answer project B's recalls. One Clear All node at the top of the graph resets the slate.
      2. Debugging "why is recall giving me the wrong image." If a fresh run still returns an old result, the key almost certainly holds stale data. Nuke everything and retry.
      3. End-of-batch cleanup. Drop it at the tail of a long run so nothing leaks into the next queue.

      Install & the honest caveat

      Installs with the pack - ComfyUI Manager → "ComfyUI FSL Nodes", or git clone https://github.com/fredlef/Comfyui_FSL_Nodes into custom_nodes, pip install -r requirements.txt, restart. No models, no API key, free.

      The honest caveat is the same one that applies to the whole memory family: it's process memory, so it's gone on restart anyway - Clear All just gives you control mid-session. And because the node has no sockets, ComfyUI won't force it into a specific execution order the way a wired node would. If ordering genuinely matters, wire it into the graph where you can; otherwise accept that "runs on queue" is the best this design offers.

      CategoryFSL Nodes

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs