Nodes/comfyui-OreX/📝 Save Text (OreX)
ComfyUI Node

📝 Save Text (OreX)

Get your LLM output off the screen and onto disk

By orex2121·Created about a year ago·Updated about 21 hours ago· 34
📝 Save Text (OreX)
  • image
  • text
  • image
activatetrue
text
output_file_path
file_name
separator
file_postfix
use_counterfalse
file_extension
overwritetrue
image_formatpng
jpg_quality90
webp_quality90
optimize_pngfalse
creat_processed_folderfalse

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:

  • overwrite on (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_counter adds 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_folder shoves the file into a processed/ subfolder - the same trick the Save Image node uses to keep a batch queue from reprocessing its own outputs.
  • If you plug an optional image in, it saves a copy of the image to the same folder with the same base name, using image_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.

CategoryEasyUse/Logic

Inputs (15)

NameTypeDefaultDescription
activateBOOLEANtrue
textSTRING
output_file_pathSTRING
file_nameSTRING
separatorSTRING
file_postfixSTRING
use_counterBOOLEANfalse
file_extensionCOMBO3 options: txt, csv, json
overwriteBOOLEANtrue
image_formatCOMBOpng6 options: png, jpg, jpeg, webp, bmp, tiff
jpg_qualityINT901–100
webp_qualityINT901–100
optimize_pngBOOLEANfalse
creat_processed_folderBOOLEANfalse
imageoptIMAGE

Outputs (2)

NameTypeDescription
textSTRING
imageIMAGE