ComfyUI Node
Save Image With Caption
Saves images as PNG and, with a caption connected, the caption next to each image under the same name (image_00001_.png + image_00001_.txt), for training datasets. The counter continues from the files in the folder and never overwrites one. Prompt and workflow are embedded unless ComfyUI runs with --disable-metadata. Nothing is drawn under the node.
Save Image With Caption
- images
- filename
◄filename_prefixComfyUI►
◄output_folderoutput►
◄caption_file_extension.txt►
◄caption—►
CategoryBCNodes/image
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | The images to save, as PNG. | |
| filename_prefix | STRING | ComfyUI | The file name before the counter (prefix_00001_.png). May hold %date:yyyy-MM-dd% or %Empty Latent Image.width% for values from nodes, %year% %month% %day% %hour% %minute% %second% %width% %height%, %batch_num% (the image's index in the batch), and `sub/` folders. |
| output_folder | STRING | output | Where to save: `output` is ComfyUI's output folder; `output/my_dataset` or `my_dataset` a folder inside it; an absolute path any folder (created when missing). |
| caption_file_extensionopt | STRING | .txt | The caption file's extension, a plain-text format: .txt, .caption, .json, .yaml, .yml, .md, .csv, .tsv, .xml, .log, .ini, .toml. |
| captionopt | STRING | Saved next to each image under the image's name. Not connected: images only. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| filename | STRING | The file name of the last image saved. |