Nodes/ComfyUI-QwenVL/aistudynow Save Text
ComfyUI Node

aistudynow Save Text

Save a caption to a file without breaking your graph — the pack's humble text writer

By aistudynow·Created 11 months ago·Updated 5 months ago· 15
aistudynow Save Text
      ◄text—►
      â—„filenameqwenvl_output.txtâ–º

      aistudynow_SaveText is the pack's boring utility, and boring is the point. Two inputs - a text string and a filename - and it writes the text to a file in ComfyUI's output directory. That's the entire job. There are fancier text-save nodes with templating and metadata and paths galore; this one exists because the pack's HF and GGUF caption nodes return their text on a RESPONSE socket but aren't output nodes, so you need something to catch the string, and a whole custom writer per captioner would be ridiculous. One save node, all the captioners.

      How it works

      When the graph runs, it takes whatever string arrives on text, and writes it to <ComfyUI>/output/<filename> as UTF-8, overwriting whatever was there. Default filename is qwenvl_output.txt, but you'll want to change it - if you're captioning a batch of images in a loop, every run clobbers the last one. That's the single most useful habit to build with this node: give every save a distinct filename, or wire the filename from something that varies per run, and suddenly you've got a crude batch-caption log. If text receives a non-string (some upstream node passes a number), it stringifies it, so it won't crash on you.

      The input side is just the two fields: text (any string) and filename (default qwenvl_output.txt). It has no outputs - it's a terminal node in the graph, the way Save Image is. It sits at the end of a wire and swallows the text, which is exactly right for a caption that you want on disk, not flowing onward.

      Why you'd actually use it

      The workflow that sells it: aistudynow_QwenVL_HF → caption an image → aistudynow_SaveText → a caption file you can hand to a training script or a dataset tool without copying text out of the UI. The LLM-in-the-graph knowledge base is blunt that captioning a LoRA set with a local VLM is the default workflow in 2026, and a save node is the missing last mile between "the caption exists in the node" and "the caption exists as a file." It's also handy for the Prompt Enhancer: ENHANCED_OUTPUT → save, and you've got a prompt library building itself.

      Getting it

      It comes with the pack - ComfyUI Manager, search "ComfyUI-QwenVL", or:

      cd ComfyUI/custom_nodes
      git clone https://github.com/aistudynow/ComfyUI-QwenVL
      

      It needs nothing beyond the pack's standard requirements; no model download, no heavy dependencies, no first-run wait. It's the one node in this pack you can use the moment ComfyUI restarts.

      Where people get burned

      Three small things. The overwrite trap above - run it twice with the same filename and your first caption is gone; distinct filenames per run, always. Second, it writes relative to ComfyUI's output folder, not the node's directory, so don't go hunting for the file in the pack folder - check ComfyUI/output/. Third, there's no confirmation UI beyond the console print, so on a long batch you can't tell at a glance whether it wrote; trust the file, or check the console for the Saved text to: line. It's not the node you'll write home about, but when you're captioning fifty images and every one needs a file on disk, it's the node that quietly makes the workflow complete.

      Category🧠aistudynow/Utility

      Inputs (2)

      NameTypeDefaultDescription
      textSTRING—
      filenameSTRINGqwenvl_output.txt—

      Outputs (0)

      No outputs