SaveText_StreamingT2V
The save half of StreamingT2V's state loop
- STRING
- BOOLEAN
SaveText_StreamingT2V writes a string to a text file in ComfyUI's input, output, or temp directories, then hands the text back. Its partner LoadText_StreamingT2V reads that same file on the next pass. If you're running a one-shot image workflow you'll never touch it. If you're running this pack's prompt-travel workflow with Auto Queue on, this node is quietly doing the bookkeeping that keeps the whole thing going.
Here's the situation it solves. StreamingT2V's headline feature is generating long videos by extending an existing seed, and the README's recommended way to run it is to turn on Auto Queue and let the graph loop, stopping when you like the result. Each loop iteration needs to know the state from the last one - what prompts are scheduled, how many frames you've built. That state can't live in a wire between nodes, because each pass is a fresh execution. It has to live on disk. This node is how it gets there.
How it works
It's a subclass of the pack's TextFileNode, like LoadText_StreamingT2V, but with a write_text function that overwrites the target file every execution. The deliberate detail: its IS_CHANGED returns NaN, which in ComfyUI means "never treat this as cached" - the node always runs. For a state-persister that's exactly right; you don't want ComfyUI deciding the write can be skipped. After writing, it reads the file back and returns both the text and a "found" boolean.
Inputs and outputs that matter
Three inputs:
- root_dir -
input,output, ortemp(defaultoutput). Pickoutputand the file lands inComfyUI/output, same place as your videos, which makes it easy to find and eyeball later. - file - the filename, default
dragtest_1.txt(a leftover test name; rename it to something meaningful). - text - the content, marked
multilineand forced as an input, so wire a STRING node into it rather than typing in the box.
Outputs are the written STRING and a BOOLEAN (True, since the file now exists). The point of returning the text isn't so you can see it - it's so downstream nodes can confirm what got persisted.
Installing it
This is one node inside the ComfyUI_StreamingT2V pack, installed the same way as the rest:
cd ComfyUI/custom_nodes
git clone https://github.com/chaojie/ComfyUI_StreamingT2V
or ComfyUI Manager → search StreamingT2V → install, then restart. The pack's dependency list is heavy (pytorch-lightning, diffusers, modelscope, xformers, bitsandbytes, ...), but that's the pack's baggage, not this node's - the text utilities themselves are dependency-free.
The honest warning
This node overwrites. Every run clobbers the file, so if you point it at a file you care about, a single queue pass replaces it. That's the intended behavior for a state loop - your "state" file gets updated, not appended. If you ever find your prompt-travel runs not advancing, it's usually because the write landed somewhere different from where the load looks - keep both nodes on the same root_dir, or you'll be chasing phantom state.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| root_dir | COMBO | output | 3 options: input, output, temp |
| file | STRING | dragtest_1.txt | — |
| text | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |
| BOOLEAN | BOOLEAN | — |