(deforum) Load Cached String
A numbered slot for text your loop needs later
- STRING
Same trick as the image cache, one dimension simpler. Deforum animations recompute and shuffle values every frame, and sometimes you need to stash a string - a prompt, a path, a resolved schedule value - and read it back a few frames later. Cache String writes it into a numbered slot; this node, Load Cached String, reads it back out.
It's a dead-simple utility: one input, one output, no models, no files. If you've already met Load Cached Image this is the same idea with the pixels swapped for text.
Input and output
cache_index- the slot number, 0 to 16. Must match the index you passed to theCache Stringwrite node, obviously.STRING- whatever string was stored in that slot, orNoneif the slot is empty.
That's genuinely the whole node. The cache lives in the pack's shared in-memory store, keyed globally by index rather than by workflow.
How it behaves - and the catch
The storage is global (gs.deforum_cache["string"]), so the value you get back isn't scoped to your workflow. That's fine when a run is linear, and it's the cause of the classic complaint: you change something, re-queue, and an old string pops back out of a slot you thought was fresh. Unlike its image sibling, this read node doesn't bail out on the global reset flag - it just returns whatever is in the slot, stale or not. If you see a prompt or path you didn't write this run, that's why.
Because strings are cheap and the slots are limited, the usual pattern is: reserve a slot per purpose ("slot 0 = current prompt," "slot 1 = output path") and never reuse it for something else. That discipline makes stale data obvious instead of subtle.
Installation
It ships in the Deforum Nodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/XmYx/deforum-comfy-nodes.git
Restart ComfyUI, or find "Deforum Nodes" by XmYx in ComfyUI Manager. No special dependencies beyond the pack itself - this node is pure plumbing, though in practice you'll be using it inside the full animation workflow with the deforum[comfy] backend installed (Python 3.10 required, per the README).
When you'd actually reach for it
Honestly? Less often than you'd think - most people only need it when a workflow handoff gets awkward, like a node that computes a value once at the start and the loop needs it frame after frame. If you find yourself copying text through the graph, this is the clean way to do it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| cache_index | INT | 00–16 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |