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

# LoadImageTextDataSetFromFolder - ComfyUI Built-in Node Documentation

> This node loads a dataset of image-text caption pairs from a selected folder and returns them as a list.

This node loads a dataset of image-text caption pairs from a selected folder and returns them as a list. It supports PNG, JPG, JPEG, and WEBP images, and for each image it looks for a caption in a `.txt` file with the same base name. The node also supports the kohya-ss/sd-scripts folder structure, where a subfolder name that starts with a number (such as `10_cats`) repeats the images inside that subfolder that many times in the output.

## Inputs

| Parameter | Description                                       | Data Type | Required | Range                                                            |
| --------- | ------------------------------------------------- | --------- | -------- | ---------------------------------------------------------------- |
| `folder`  | The folder to load images and text captions from. | COMBO     | Yes      | Subfolders inside ComfyUI's input directory (dynamically loaded) |

**Note:** The selected folder must be a subfolder of ComfyUI's input directory. The node expects one `.txt` caption file per image: for each image file (`.png`, `.jpg`, `.jpeg`, `.webp`) it looks for a `.txt` file with the same base name in the same location and uses its trimmed contents as the caption. If no caption file is found, an empty string is used. The node also supports the kohya-ss/sd-scripts folder structure: subfolders whose name starts with a number and an underscore (for example `5_cats`) repeat the images inside them that number of times in the final output list. If the selected folder contains no valid images, the node raises an error.

## Outputs

| Output Name | Description                                                                                                                                                      | Data Type |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
| `images`    | List of loaded images. Images are converted to RGB and normalized to the 0–1 float range.                                                                        | IMAGE     |
| `texts`     | List of text captions, one for each loaded image. Captions are the trimmed contents of the matching `.txt` file, or an empty string when no caption file exists. | STRING    |

> 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/LoadImageTextDataSetFromFolder/en.md)

***

**Source fingerprint (SHA-256):** `d34494d59a65edb38d7e6a5f12c241fb0093371db0b0bf1e52789e84209ad3f5`
