Text Batch Saver
Write your whole text batch back to disk
- batch_texts
- batch_filenames
- saved_files
The reverse of Text Batch Loader: take a list of strings, write each one to its own file, and hand you the paths. Text Batch Saver is what you put at the end of a batch workflow when the thing downstream - another tool, another app, a render farm - wants actual files, not a ComfyUI list.
Mechanism, straight from the source: it creates the output folder if it doesn't exist, then writes one file per item. If you pass batch_filenames (the aligned list from a Loader), each file is named after that item's original base name; otherwise it uses a zero-padded counter - file_0001.txt, file_0002.txt - with the pad width you set. It returns the full paths of everything it wrote.
Inputs that matter:
save_dir(default./output) - and here's the gotcha. This is a relative path resolved against wherever ComfyUI was launched from, so on a desktop or portable install./outputusually lands in the ComfyUI folder itself, not youroutputtab. Give it an absolute path if you want the files somewhere you'll actually find them. Bonus: the path accepts a[time(%Y-%m-%d)]token that expands via strftime, so date-stamped output folders are one string away.filename_prefix(defaultfile),filename_sep(default_),filename_pad(default 4, range 1–8),file_extension(default.txt- a dot is added automatically if you forget it),encoding(defaultutf-8).- Optional
filename_suffix- appended to every filename - andbatch_filenames.
Output: saved_files (LIST) - the paths of the files written. If a write fails, the node doesn't crash; Error: <reason> lands in the list at that slot, so glance at the console after a run.
The free-form file_extension and encoding fields mean it's not limited to plain text: want .md, .srt, or a different encoding? Type it in. That flexibility plus the [time(...)] token is why this node quietly outpunches its "save text" label.
Install is the pack-standard: ComfyUI Manager → search "ComfyUI Video BC", or cd ComfyUI/custom_nodes && git clone https://github.com/JioJe/comfyui_video_BC and restart. Text nodes have no heavy dependencies and no models to fetch. If you're building a folder-of-prompts pipeline, the full loop is Loader → Replace → Saver, and this is the last node you touch before everything is real files on disk.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| batch_texts | LIST | — | |
| save_dir | STRING | ./output | — |
| filename_prefix | STRING | file | — |
| filename_sep | STRING | _ | — |
| filename_pad | INT | 41–8 | — |
| file_extension | STRING | .txt | — |
| encoding | STRING | utf-8 | — |
| filename_suffixopt | STRING | — | |
| batch_filenamesopt | LIST | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| saved_files | LIST | — |