Get LocalStorage
The Ovum node the author himself tells you to avoid
- value
- exists
Let's start with the node's own description, because it's the most honest thing you'll read today: "Is a total kludge, and should be avoided at all costs." That's the author writing about his own creation. Get LocalStorage tries to read a key from your browser's localStorage - the storage that lives in the browser tab, not on the ComfyUI server - and return it into the graph.
Why would anyone want that? Because localStorage survives browser restarts in a way server-side state doesn't. You could stash a setting, a prefix, or a flag in the browser and have a workflow read it later, even across sessions. In theory that's the "persist this between runs" story. In practice, it's a frontend round-trip held together with a UI channel and an HTTP endpoint, and the author would rather you use environment variables or just about anything else.
How it works (and why it's a kludge)
The backend can't touch the browser - that's the core problem. So this node runs, and instead of having an answer, it asks the frontend to fetch the value from localStorage via ComfyUI's UI-return channel. Meanwhile the backend returns your default value immediately, and the real value shows up later, cached server-side through an /ovum/localstorage/get route. There's a hash-based IS_CHANGED hack so the node re-runs when the key changes. It works, after a fashion. It is not how you want to feel about your data flow.
Inputs and outputs
- name (
STRING) - the localStorage key to read. - default (
STRING) - fallback value if the key isn't present (also what the node returns before the round-trip resolves). - Outputs: value (
STRING) and exists (BOOLEAN) - "was the key actually there?"
Both value and exists are string/bool outputs, and everything is string-typed - localStorage only stores strings, so anything structured has to be JSON-encoded in the graph.
When you'd ignore the author and use it anyway
Honestly? Rarely, and only for cosmetic coordination. If you want a key that survives browser restarts and you're okay with the value being advisory rather than authoritative, it does work. But the pack's own guidance is unambiguous: for true backend-readable values, use the environment-variable nodes (Set/Get Environment Variable), which share the same publish/subscribe idea but live on the server where nodes can actually read them. The author of comfy-ovum is the same person behind the AMD/ROCm PyTorch wheels guide for Windows and a ComfyUI "spotlight" launcher - a genuinely useful contributor - so when he says "this one's a kludge, avoid it," the reasonable default is to listen.
Installing it
It ships in sfinktah/comfy-ovum:
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
or search comfy-ovum in ComfyUI Manager, then restart.
The bottom line
If you found this node while hunting for cross-session persistence: check out the environment-variable nodes in the same pack first, and if those don't fit, consider writing a real file or config. Get LocalStorage works - it's in production, the author ships it - but it's the "I'm out of better options" node, not the first one you reach for.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| name | STRING | localStorage key to read. | |
| default | STRING | Fallback value if not present. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| value | STRING | — |
| exists | BOOLEAN | — |