ComfyUI Extension: comfyui-save-text

Authored by elowbe

Created

Updated

1 stars

Run ComfyUI workflows without the setup

No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.

API friendly save text to file.

Looking for a different extension?

Custom Nodes (1)

README

ComfyUI Save Text/File

A small ComfyUI custom node for saving text content to files in the ComfyUI output directory.

The node is designed for API workflows: saved files are returned in the workflow history output JSON using the same shape as ComfyUI's built-in Save Image node.

What It Does

This extension adds one output node:

  • Save Text/File

The node writes a text input to disk and returns the saved file metadata under the images key:

{
  "filename": "ComfyUI_00001_.txt",
  "subfolder": "text",
  "type": "output"
}

When you query ComfyUI history through the API, the saved text file appears like a normal saved image result:

{
  "outputs": {
    "12": {
      "images": [
        {
          "filename": "ComfyUI_00001_.txt",
          "subfolder": "text",
          "type": "output"
        }
      ]
    }
  }
}

That means clients that already read Save Image outputs from /history/{prompt_id} can read this node's saved file path the same way.

Node Inputs

  • text: The text content to save. This is a multiline string input.
  • filename_prefix: The output filename prefix. Defaults to text/ComfyUI.
  • file_extension: The extension to use, without path separators. Defaults to txt.

Examples for file_extension:

  • txt
  • json
  • md
  • csv

The saved file is written under ComfyUI's normal output directory. Subfolders can be included in filename_prefix, for example:

logs/my_result

This creates files like:

ComfyUI/output/logs/my_result_00001_.txt

Installation

  1. Install with ComfyUI Manager, serach comfyui-save-text by elowbe

  2. Clone or copy this folder into your ComfyUI custom_nodes directory:

cd ComfyUI/custom_nodes
git clone https://github.com/elowbe/comfyui-save-text.git

If you already have the folder locally, it should be located at:

ComfyUI/custom_nodes/comfyui-save-text

Then restart ComfyUI.

After restart, search for:

Save Text/File

API Usage Notes

Use this node as an output node in your workflow. After queueing a prompt and waiting for completion, query:

GET /history/{prompt_id}

The saved file metadata will be in:

history[prompt_id].outputs[save_text_node_id].images

To download or access the file, use the returned filename, subfolder, and type fields the same way you would for a Save Image result.

Safety

The node uses ComfyUI's normal output path handling, so filename_prefix is constrained to the output directory. The file_extension input rejects path separators.

Run ComfyUI workflows without the setup

No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.

Learn more