Smart Save Text File
The ComfyUI text saver that appends instead of fighting you
- STRING
You've got a string you want on disk - a prompt, a LoRA log, a settings dump - and you don't want to build a folder-and-filename ceremony around it. Smart Save Text File is the one-line answer: give it text and a filename, it writes the file under ComfyUI's output folder, and hands the text back to you on the other side.
It's part of the SmartHelperNodes grab-bag from slvslvslv, a small pack of utility nodes that mostly exist to make the author's own workflows neater. This node is the "just log it" workhorse of that collection, and it's the one you'll end up wiring into the pack's other string-producing nodes.
How it works
The mechanism is deliberately boring, which is the point. On execution it joins your filename onto ComfyUI's output directory, creates any subfolders in the path, and appends the text to the file. Append, not overwrite - that's the behavior to internalize before you use it for anything you care about:
- Run a workflow twice and the second run stacks onto the first.
- If the file doesn't already end with a newline, it inserts one so your entries don't glom together.
- A filename like
logs/2026/hv_lora.txtjust works; the directories are made for you.
Because it's an output node, the result shows up in the UI, and the STRING output passes the original text through unchanged. That passthrough looks pointless until you realize you can chain it: dump a LoRA string into the saver and keep feeding it downstream at the same time.
The inputs that matter
Only two, and both are in the author's own schema:
text- the multiline string to write.filename- relative to ComfyUI's output directory, defaultoutput.txt.
That's it. There's no overwrite mode, no timestamp auto-insert, no counter. If you want per-run filenames, build one upstream - the pack's own Smart Format String node can bake %H:%M into a filename before it reaches this node.
Where it shines
The natural pairing is with the pack's LoRA selectors and loaders. SmartLoadLoRA, SmartHVLoraSelect, and SmartHVLoraStack all output a human-readable lora_string; route that into text here and you get a permanent record of exactly which LoRAs and strengths a render used, which is gold when you're iterating on a look and want to know what you actually changed.
Installing it
SmartHelperNodes installs as one pack; there's no separate install for this node.
cd ComfyUI/custom_nodes
git clone https://github.com/slvslvslv/ComfyUI-SmartHelperNodes
Then restart ComfyUI. ComfyUI Manager works too - search "SmartHelperNodes". There are no pip dependencies (requirements.txt is empty) and no model files to download.
Troubleshooting
The only real gotcha is the append semantics: people expect a fresh file and get a growing one. If your file has months of history, that's the feature, not a bug - point filename at a new path when you want a clean start. One more: the path is always relative to output, so a leading slash or ../ won't escape it the way you might hope. Keep filenames simple and you'll be fine.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| filename | STRING | output.txt | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |