Nodes/TA-ComfyUI-Nodes-Pack/πŸ“ TA Save Image With Prompt
ComfyUI Node

πŸ“ TA Save Image With Prompt

Save a PNG and the prompt that made it, in one node

By tmode-1960Β·Created 11 months agoΒ·Updated 5 months agoΒ· 5
πŸ“ TA Save Image With Prompt
  • images
  • IMAGE
β—„filename_prefixComfyUIβ–Ί
β—„positive_promptβ€”β–Ί
β—„negative_promptβ€”β–Ί
β—„save_txtenabledβ–Ί

The built-in SaveImage stores your picture and a chunk of PNG metadata, which is fine until you want the prompt as a plain text file next to the image. That's the niche TA Save Image With Prompt fills: it's ComfyUI's SaveImage with a sidecar .txt writer bolted on, so every PNG you save gets a human-readable file recording what generated it.

You wire an images tensor in, set a filename_prefix, and it writes PNGs to your ComfyUI output directory exactly like the stock node. The two extra inputs are the prompts themselves - positive_prompt and negative_prompt are plain strings, typically pulled from wherever your prompt text lives in the graph - plus a save_txt toggle ("enabled" by default) that decides whether the companion .txt files get written. When enabled, each saved PNG gets a same-name .txt containing the prompts and a timestamp. The node passes IMAGE through unchanged on its output, so you can chain it without breaking your flow.

That filename_prefix field is more useful than it looks. It supports ComfyUI's %date:yyyy-MM-dd% formatting tokens, and you can reference other node values inside it - like pulling the width out of an Empty Latent Image node - so your filenames can carry real information instead of a counter. If you pair it with the pack's TA Filename Generator, you can feed its structured path string straight into the prefix and get consistent, date-and-model-stamped file names across every save.

Under the hood it subclasses ComfyUI's own SaveImage, calls the same save_images() the stock node uses, then writes the sidecar. That inheritance is why it behaves identically to the node you already know - same output folder, same counter handling, same PNG-only output. If you want smaller files or a quality knob, that's what TA Save Image Optional is for (JPEG/WebP, adjustable quality, plus an enable switch). This one is the keep-it-simple PNG option.

Install. Same pack, no dependencies:

cd ComfyUI/custom_nodes
git clone https://github.com/tmode-1960/TA-ComfyUI-Nodes-Pack

or ComfyUI Manager β†’ search "TA ComfyUI Nodes Pack". Restart, and it lives under TA Nodes/utils.

Gotchas. A few things to know. First, positive_prompt and negative_prompt are required inputs even if you don't care about the sidecar - leave save_txt off and they're simply ignored. Second, remember the v2.x pack rewrite: old TA v1 save workflows don't port over; node names and connections changed, so rebuild them. Third, since the .txt is written fresh each run, an output directory full of sidecars builds up fast - the timestamp is what keeps names from colliding, so don't hardcode a static prefix if you generate a lot.

CategoryTA Nodes/utils

Inputs (5)

NameTypeDefaultDescription
imagesIMAGEThe images to save.
filename_prefixSTRINGComfyUIThe prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes.
positive_promptSTRINGβ€”
negative_promptSTRINGβ€”
save_txtCOMBOenabled2 options: enabled, disabled

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”