Nodes/comfyUI-tool-2lab/Save Text 保存文本 (2lab)
ComfyUI Node

Save Text 保存文本 (2lab)

Write text to disk from inside your workflow

By AI2lab·Created 2 years ago·Updated 2 years ago· 23
Save Text 保存文本 (2lab)
      text
      path
      filename

      Every ComfyUI regular has hit the same wall: a workflow generates some text - a prompt, a caption, a translated string, an API response - and there's no clean built-in way to write it to a file. SaveText (2lab) is the simple fix: feed it a string, tell it where to put it, and it writes the text to disk. It's the text version of Save Image, and it's the node you'll reach for when you want a permanent record of what actually ran.

      Inputs

      Three fields, two of which you'll actually touch:

      • text - the string to save. This is the whole payload.
      • path - where the file goes. Leave it empty for the default location (ComfyUI's output dir), or give it a folder. If the folder doesn't exist, the node creates it.
      • filename - optional. Provide it to control the exact file name; leave it blank and the node generates one for you so files don't collide across runs.

      No outputs - terminal node, last stop on the wire.

      How it works

      It's a file write, full stop. The string arrives, the node resolves the destination from path and filename, writes the bytes with UTF-8 encoding, and you've got a file. The useful part is what you can hang off the front of it: run a translation node, a captioning model, or a prompt constructor, and this node is how you snapshot the result for later. In the batch-style workflows this pack is built around, that's often the difference between "I have the output" and "I have a record I can grep tomorrow."

      Installing it

      Standard fare for this pack. ComfyUI Manager → search "comfyUI-tool-2lab" → install, or:

      cd ComfyUI/custom_nodes
      git clone https://github.com/AI2lab/comfyUI-tool-2lab
      

      Then restart ComfyUI. No models, no extra pip packages - the pack is plain Python utilities.

      Gotchas

      • Empty path isn't "no path," it's "default." Don't expect an error if you leave it blank - the file goes to ComfyUI's default output location. If you can't find your file, check there before blaming the node.
      • Overwriting is on you. With a fixed filename and repeated runs, the node will happily write over the previous file (or the counter logic kicks in). If you want a run history, include something unique in the filename - a timestamp from an upstream node works.
      • Repo visibility. The pack's GitHub page currently returns 404, which usually means the author made the repo private or renamed it. A fresh clone can fail while the nodes keep working in already-installed setups, so if your install balks, that's a known state of the world rather than an error in your steps.
      Category☁️2lab/util

      Inputs (3)

      NameTypeDefaultDescription
      textSTRING
      pathSTRING
      filenameoptSTRING

      Outputs (0)

      No outputs