Data Temp Set
Stash data in a session variable across loop runs
- image_data
- any_data
- status
- preview
- array_size
- info
Here's the problem Data Temp Set is trying to solve. In aidec's batch pack, a "loop" is really the same workflow run over and over, once per item, driven by a queue counter. Each run is independent - which is great for isolation, but it means there's nowhere to accumulate anything. Generate a caption on iteration 3 and it's gone by iteration 4. Data Temp Set gives you a place to stash things that survives from one run to the next: a named variable (or an array) living in ComfyUI's session memory.
Fair warning up front: this is one of the pack's experimental nodes. The README documents the queue processors and loaders in detail and lumps the rest under "test nodes." So think of Data Temp Set as a build-your-own-loop primitive - genuinely handy if you're assembling something the polished nodes don't cover, but rough around the edges and light on documentation. If you just want to run a prompt list, you don't need this.
How it works
It writes into a session-wide store keyed by a variable name. You choose what kind of write with operation: set a value outright, push onto an array (the interesting one - call it each iteration and you build up a list across the whole batch), set a specific array slot, or clear things out. Because the store lives in the running ComfyUI process, whatever you set stays readable by Data Temp Get on later runs, until you clear it or restart.
The inputs that matter
- var_name - the name you'll read it back by.
my_varis the placeholder; give it something meaningful. - operation -
set_variable,array_push,array_set_index,clear_all, orclear_index. For accumulating results across a loop,array_pushis the one. - data_type -
text,image, orany. Match it to what you're storing. - text_data / image_data / any_data (optional) - the actual payload, whichever type applies.
- array_index (optional) - the slot, for the index-specific operations.
Outputs: status, array_size (how many items are in the array now - useful for tracking a growing accumulation), info, and a preview image. Data Temp Set is an output node, so it can sit at the end of a branch and do its write without needing a consumer.
Installing it
cd ComfyUI/custom_nodes && git clone https://github.com/aidec/Comfyui_TextBatch_aidec, then restart ComfyUI (or ComfyUI Manager → Install via Git URL). No models, no heavy dependencies. Category: TextBatch.
Where people get burned
- State outlives your run. That's the feature and the footgun. Values persist in the session, so if you start a fresh batch without clearing, you're appending to last batch's leftovers. Use a
clear_allat the start of a run, or a freshvar_name, so you're not accumulating on top of stale data. - Name typos are silent. Set under
resultsand read fromresultand you'll just get nothing - no error, no hint. Keep the variable name identical between Set and Get. - It's experimental. Thin error handling, no real docs. Prototype small, confirm the array is growing the way you expect (watch
array_size), then build on it. - Restart wipes it. This is session memory, not disk. Restart ComfyUI and it's gone - don't treat it as durable storage.
Powerful in the "I'm hand-building a loop that collects results" sense. Skip it entirely for a plain prompt-list batch.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| var_name | STRING | my_var | — |
| operation | COMBO | set_variable | 5 options: set_variable, array_push, array_set_index, clear_all, clear_index |
| data_type | COMBO | text | 3 options: text, image, any |
| text_dataopt | STRING | — | |
| image_dataopt | IMAGE | — | |
| any_dataopt | * | — | |
| array_indexopt | INT | 00–10000 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| status | STRING | — |
| preview | IMAGE | — |
| array_size | INT | — |
| info | STRING | — |