Nodes/ComfyUI-OllamaGemini/Gemini Save Text
ComfyUI Node

Gemini Save Text

Dump a string to a .txt file

By al-swaiti·Created 2 years ago·Updated 2 months ago· 184
Gemini Save Text
      filenameinfo
      path
      text

      The simplest node in the pack, and a genuinely handy bit of plumbing. It writes a text string to a file on disk. That's the whole job - and the reason it exists is the rest of the pack: the Gemini, OpenAI, Claude, Ollama, and Qwen nodes all output text, and often you want to keep that text - the prompt an LLM wrote, a caption it generated, a description - next to your images rather than watching it vanish when the graph finishes.

      The "Gemini" prefix is just the pack's naming convention; there's no AI and no key here.

      How it works

      You give it a filename, a path, and the text. It writes the text to that file. There's nothing more to it - no formatting, no templating, no model. It's a sink: text goes in, a .txt file appears, and the node produces no outputs (it's a terminal output node).

      The inputs that matter

      All three inputs are required and self-explanatory:

      • text - the string to save. Wire this from any node that emits text, most usefully one of the pack's LLM API nodes.
      • filename (default info) - the name of the file.
      • path - where to write it. Leave it blank for the default location, or give it a folder.

      There are no outputs; the node's effect is the file it writes.

      Installing it

      It comes with the ComfyUI-OllamaGemini pack. Install through ComfyUI Manager (search ComfyUI-OllamaGemini, install, restart) or by hand:

      cd ComfyUI/custom_nodes
      git clone https://github.com/al-swaiti/ComfyUI-OllamaGemini
      pip install -r requirements.txt
      

      then restart. No models, no credentials - pure file I/O.

      Where people get burned

      The only real gotcha is paths. If you leave path blank the file lands in the node's default location, which isn't always where you expect to look - so if you "can't find" the saved file, check the ComfyUI output folder and the console, and use an explicit absolute path when you want certainty. Make sure the folder you point at actually exists and is writable; a bad path is the one way this node fails.

      Also worth knowing: the node doesn't expose an append-versus-overwrite switch, so treat it as writing a file rather than growing a log. If you're saving one text blob per generation, give the filename something that varies (or accept that a fixed name may be overwritten run to run). For the common use - capturing the LLM-written prompt alongside the image it produced - it does exactly what you want with zero fuss.

      CategoryAI API

      Inputs (3)

      NameTypeDefaultDescription
      filenameSTRINGinfo
      pathSTRING
      textSTRING

      Outputs (0)

      No outputs