Skip to main content
The Save Image and Text Dataset to Folder node saves a list of images and their corresponding text captions to a specified folder within ComfyUI’s output directory. For each image saved as a PNG file, a matching text file with the same base name is created to store its caption. This is useful for creating organized datasets of generated images and their descriptions.

Inputs

ParameterDescriptionData TypeRequiredRange
imagesList of images to save.IMAGEYes-
textsList of text captions to save. This input is optional.STRINGNo-
folder_nameName of the folder to save images to (inside output directory). (default: “dataset”)STRINGNo-
filename_prefixPrefix for saved image filenames. (default: “image”)STRINGNo-
Note: The images input is a list. The texts input is optional; if provided, it should be a list of text captions. The node expects the number of text captions to match the number of images provided. Each caption will be saved in a .txt file corresponding to its paired image.

Outputs

Output NameDescriptionData Type
-This node does not have any outputs. It saves files directly to the filesystem.-
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): e772e0f9b56af1dfd65a384e22eda2065215c8a9ca0360c93885e39721b0c767