📝 Save Text (OreX)
Get your LLM output off the screen and onto disk
- image
- text
- image
Once you've got an Ollama or LM Studio node writing prompts for you, the next question is where that text goes. ComfyUI shows strings in a little text box and that's about it. Save Text (OreX) is the node that actually writes your LLM output - or any string - to a file, in txt, csv, or json, and can drop an image alongside it. It's the "save button" for the text half of your workflow, and it's more configurable than you'd expect for something so simple.
How it works
You give it text (wire it from any STRING output) and it writes the file to output_file_path with file_name and an optional file_postfix, joined by separator. Leave the path empty and it goes to ComfyUI's output folder; give a relative path and it's resolved against output; an absolute path is used as-is. A few behaviors worth knowing:
overwriteon (default) truncates the file each run ("w"mode). Turn it off and it appends ("a") - that's how you accumulate a log of every prompt an LLM generated.use_counteradds a numeric suffix and increments until it finds a filename that doesn't exist, so you never clobber an earlier save.- csv mode writes each line of the input as its own row; json mode parses your text as JSON first and pretty-prints it (falling back to
{"text": ...}if it isn't valid JSON). If you're dumping structured LLM output, that's genuinely useful. creat_processed_foldershoves the file into aprocessed/subfolder - the same trick the Save Image node uses to keep a batch queue from reprocessing its own outputs.- If you plug an optional
imagein, it saves a copy of the image to the same folder with the same base name, usingimage_format(png/jpg/webp/bmp/tiff) and the matching quality slider.
The activate toggle is a global kill-switch: flip it off and the node just passes text through without writing anything. Handy when you want to dry-run a workflow without littering your output folder.
Inputs and outputs that matter
For a beginner, really only four inputs matter: activate, text, output_file_path, and file_name (plus use_counter if you run the same thing repeatedly). Everything else is polish. The node passes text and image straight through as outputs - it's an output node, so the pass-through is there so you can chain it mid-graph without breaking the flow.
Install
Same pack, same two paths - ComfyUI Manager (search "comfyui-OreX") or:
cd ComfyUI/custom_nodes
git clone https://github.com/orex2121/comfyui-OreX
Restart. No model downloads, no keys.
Where people get tripped up
The most common mistake is forgetting overwrite is on and wondering why a growing log only has one line. The second is typing a path that doesn't exist - the node creates directories, but if your path has a typo you'll get a silent empty result or a Python error in the console. And one quirk to respect: separator defaults to empty, so file_name + file_postfix with no separator produces MyPromptv2 instead of MyPrompt_v2. Set it to _ and you'll be happier.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| activate | BOOLEAN | true | — |
| text | STRING | — | |
| output_file_path | STRING | — | |
| file_name | STRING | — | |
| separator | STRING | — | |
| file_postfix | STRING | — | |
| use_counter | BOOLEAN | false | — |
| file_extension | COMBO | 3 options: txt, csv, json | |
| overwrite | BOOLEAN | true | — |
| image_format | COMBO | png | 6 options: png, jpg, jpeg, webp, bmp, tiff |
| jpg_quality | INT | 901–100 | — |
| webp_quality | INT | 901–100 | — |
| optimize_png | BOOLEAN | false | — |
| creat_processed_folder | BOOLEAN | false | — |
| imageopt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| image | IMAGE | — |