> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-docs-partner-nodes-consolidate.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# SaveImageTextDataSetToFolder - ComfyUI Built-in Node Documentation

> Save Image-Text (to Folder) saves a list of images and their matching text captions to a specified folder inside ComfyUI's output directory.

Save Image-Text (to Folder) saves a list of images and their matching text captions to a specified folder inside ComfyUI's output directory. For each image saved as a PNG file, a matching TXT file with the same base name is created to store its caption, which makes it useful for creating organized datasets of generated images paired with their descriptions.

## Inputs

| Parameter         | Description                                                                                             | Data Type | Required | Range                        |
| ----------------- | ------------------------------------------------------------------------------------------------------- | --------- | -------- | ---------------------------- |
| `images`          | List of images to save.                                                                                 | IMAGE     | Yes      | -                            |
| `texts`           | List of text captions to save. This input is optional.                                                  | STRING    | No       | -                            |
| `folder_name`     | Name of the folder to save images to (inside output directory). (default: "dataset")                    | STRING    | Yes      | -                            |
| `filename_prefix` | Prefix for saved image filenames. (default: "image")                                                    | STRING    | Yes      | -                            |
| `mode`            | Whether to overwrite existing files or increment filenames to avoid overwriting. (default: "overwrite") | COMBO     | Yes      | "overwrite"<br />"increment" |

**Note:** The `images` input is a list. 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

| Output Name | Description                                                           | Data Type |
| ----------- | --------------------------------------------------------------------- | --------- |
| -           | This node returns no data. 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](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/SaveImageTextDataSetToFolder/en.md)

***

**Source fingerprint (SHA-256):** `46c5a04ba1befedf62b75abbff2442dde934048f365fa7e2604ea37e70d8fdcb`
