Skip to main content
Save Image-Text (to Folder) saves a dataset of image and text caption pairs to a folder inside ComfyUI’s output directory. Each image is written as a PNG file, and its matching caption is written as a TXT file with the same base filename, so every image ends up paired with its description.

Inputs

Note: The images input is a list, and the node receives both images and texts as lists. The texts input is optional; if provided, it should be a list of text captions and should contain the same number of items as images. Each caption is saved as a .txt file corresponding to its paired image. In overwrite mode, files are named {filename_prefix}_{index}.png and replace any existing files with the same name. In increment mode, a unique counter is added to the filenames so existing files are not overwritten. The folder_name must resolve to a path inside the output directory; folder names that try to escape it (for example with ..) are rejected.

Outputs

This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub

Source fingerprint (SHA-256): 46c5a04ba1befedf62b75abbff2442dde934048f365fa7e2604ea37e70d8fdcb