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

# LoadTrainingDataset - ComfyUI Built-in Node Documentation

> This node loads an encoded training dataset (latents and conditioning) that was previously saved to disk.

This node loads an encoded training dataset (latents and conditioning) that was previously saved to disk. It reads all data shard files from a selected dataset folder in the datasets directory and returns the combined latent vectors and conditioning data for use in training workflows.

## Inputs

| Parameter     | Description                                         | Data Type | Required | Range                                                         |
| ------------- | --------------------------------------------------- | --------- | -------- | ------------------------------------------------------------- |
| `folder_name` | Saved dataset to load, from the datasets directory. | COMBO     | Yes      | One option per dataset folder found in the datasets directory |

Note: The `folder_name` options are built automatically by scanning the datasets directory. A subfolder is listed as a dataset when it contains a `metadata.json` file or at least one `.safetensors` file. The selected dataset folder is searched across all configured dataset root directories. The node reads all files named `shard_*.pkl` in the selected folder and raises an error if no shard files are found.

## Outputs

| Output Name    | Description                                                                                                | Data Type    |
| -------------- | ---------------------------------------------------------------------------------------------------------- | ------------ |
| `latents`      | List of latent dicts, where each dict contains a `"samples"` key with a tensor.                            | LATENT       |
| `conditioning` | List of conditioning lists, where each inner list contains conditioning data for the corresponding sample. | CONDITIONING |

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

***

**Source fingerprint (SHA-256):** `9f914b27f067460f6f3b54f3f2a7bb793c65b99c85e8aa14ab64894be26bd816`
