> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# SaveText - ComfyUI Built-in Node Documentation

> Complete documentation for the SaveText node in ComfyUI. Learn its inputs, outputs, parameters and usage.

保存文本节点将文本内容写入输出目录中的文件。它支持以 .txt、.md 或 .json 格式保存，并在提供有效 JSON 时自动处理 JSON 美化打印。

## ## 输入

| 参数                | 描述                      | 数据类型   | 是否必填 | 范围                                |
| ----------------- | ----------------------- | ------ | ---- | --------------------------------- |
| `text`            | 要保存到文件的文本内容             | STRING | 是    | -                                 |
| `filename_prefix` | 输出文件名的前缀（默认值："ComfyUI"） | STRING | 否    | -                                 |
| `format`          | 保存文本的文件格式（默认值："txt"）    | STRING | 否    | `"txt"`<br />`"md"`<br />`"json"` |

## ## 输出

| 输出名    | 描述            | 数据类型   |
| ------ | ------------- | ------ |
| `text` | 已保存到文件的原始文本内容 | STRING |

> 本文档由 AI 生成。如果您发现任何错误或有改进建议，欢迎贡献！ [在 GitHub 上编辑](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/SaveText/zh.md)

***

**Source fingerprint (SHA-256):** `5644d143f415773115b38d7af6d9afea20c9eadef2cea836b0384c15e0dcba6a`
