π Text Save
Stop losing LLM output β save text straight to your output folder
- STRING
ComfyUI saves images beautifully and text almost not at all. If you've ever run an LLM node, gotten a great caption, and then had it vanish into the void of a re-queue, π Text Save is the fix: it writes whatever string you hand it to disk in ComfyUI's output directory, auto-numbers the file so nothing gets overwritten, and - the nice part - returns the full path it wrote to. Text finally leaves the graph as something you can keep.
How it works
The required inputs are text (multiline STRING, the content to save) and filename_prefix (a STRING defaulting to ComfyUI, the base name). There's one optional input, file_extension, defaulting to .txt. On execution the node writes the text to ComfyUI/output/<filename_prefix>_<counter>.txt - the counter increments per run, so saving twice with the same prefix gives you two files instead of one clobbered file. The node is marked as an output node, so it runs as a terminal step, and it returns the full file path as its STRING output.
Note the extension behavior: the default value is .txt and it's used as-is, so if you change it to md without the dot you'll get a file named something_00001_md. Keep the dot. It's a small detail that costs a confused folder listing.
Inputs and outputs
- text -
STRING, multiline. What gets saved. - filename_prefix -
STRING, default"ComfyUI". Base filename. - file_extension -
STRING, optional, default".txt". - Output:
STRING- the absolute path of the written file.
Where it shines
The killer pairing is with the pack's π
OpenAI GPT Chat node: generate a caption or a rewritten prompt, wire the STRING output straight into text, and every run's result is preserved as a file you can browse later. Pair it with π
Text Load for the round-trip. It's also the clean way to log intermediate text during debugging - being able to read exactly what your text chain produced mid-pipeline beats squinting at a console.
Install
Ships in hay86/ComfyUI_AceNodes:
cd ComfyUI/custom_nodes
git clone https://github.com/hay86/ComfyUI_AceNodes
cd ComfyUI_AceNodes
pip install -r requirements.txt
Restart ComfyUI and look for π
Text Save under Ace Nodes. Manager users search ComfyUI_AceNodes.
Gotchas
Files land in the ComfyUI output directory, numbered per prefix - that's the pattern, not a bug. Remember the .txt default needs its dot if you change extensions. And the pack's usual install weight applies: the full requirements.txt (rembg, transformers, boto3, insightfaceβ¦) comes along even though this node is pure file I/O. For anything where you want text to survive the session, though, it's the right tool.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | β | |
| filename_prefix | STRING | ComfyUI | β |
| file_extensionopt | STRING | .txt | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | β |