> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# LoadImageTextDataSetFromFolder - ComfyUI Built-in Node Documentation

> Complete documentation for the LoadImageTextDataSetFromFolder node in ComfyUI. Learn its inputs, outputs, parameters and usage.

> 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)

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 | Data Type | Required | Range                                                           | Description                                                                                                    |
| --------- | --------- | -------- | --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `folder`  | COMBO     | Yes      | *Dynamically loaded from `folder_paths.get_input_subfolders()`* | The folder to load images from. The available options are the subdirectories within ComfyUI's input directory. |

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