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

# LoadVideoTextDataSetFromFolder - ComfyUI Built-in Node Documentation

> This node loads video files and their associated text captions from a selected subfolder in the ComfyUI input directory, and returns them as two lists: videos and captions.

This node loads video files and their associated text captions from a selected subfolder in the ComfyUI input directory, and returns them as two lists: videos and captions. The video entries are lazy references, so frames are decoded only when a downstream node needs them. Supported formats are MP4, AVI, MOV, WEBM, MKV, and FLV. Nested folders with a repeat-count prefix (for example `5_classname/`, as used by tools like kohya-ss/sd-scripts) are also supported.

## Inputs

| Parameter | Description                                          | Data Type | Required | Range                                                                    |
| --------- | ---------------------------------------------------- | --------- | -------- | ------------------------------------------------------------------------ |
| `folder`  | The folder containing video files and .txt captions. | STRING    | Yes      | Combo: dynamic list of all subfolders inside the ComfyUI input directory |

If the selected folder contains no files with a supported video extension, the node raises an error. For nested folders whose name starts with a number followed by an underscore (for example `5_classname`), each video inside that folder is included in the dataset the number of times given by that prefix.

## Outputs

| Output Name | Description                                                                                                           | Data Type     |
| ----------- | --------------------------------------------------------------------------------------------------------------------- | ------------- |
| `videos`    | Lazy video references; frames are decoded only when needed downstream. One entry per video file found in the folder.  | VIDEO (list)  |
| `texts`     | List of text captions. One caption per video; if a video has no matching `.txt` file, its caption is an empty string. | STRING (list) |

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

***

**Source fingerprint (SHA-256):** `91236fcb1e42b8de1a1100b0aecaad49bd49c159d7d8f502032cd7f5b2b54845`
