This node loads a dataset of images and their corresponding text captions from a specified folder. It searches for image files and automatically looks for matching `.txt` files with the same base name to use as captions. The node also supports a specific folder structure where subfolders can be named with a number prefix (like `10_folder_name`) to indicate that the images inside should be repeated multiple times in the output.

## Inputs

| Parameter | Description | Data Type | Required | Range |
| --- | --- | --- | --- | --- |
| `folder` | The folder to load images and text captions from. The available options are the subdirectories within ComfyUI's input directory. | COMBO | Yes | *Dynamically loaded from `folder_paths.get_input_subfolders()`* |

**Note:** The node expects a specific file structure. For each image file (`.png`, `.jpg`, `.jpeg`, `.webp`), it will look for a `.txt` file with the same name to use as a caption. If a caption file is not found, an empty string is used. The node also supports a special structure where a subfolder's name begins with a number and an underscore (e.g., `5_cats`), which will cause all images inside that subfolder to be repeated that number of times in the final output list.

## Outputs

| Output Name | Description | Data Type |
| --- | --- | --- |
| `images` | A list of loaded image tensors. | IMAGE |
| `texts` | A list of text captions corresponding to each loaded image. | 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):** `c505d580b7bfb84ee71aca8fa98c847eeba531da9e578ddfe17818a2fd2ae5e8`
