> ## 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.

# SaveTrainingDataset - ComfyUI Built-in Node Documentation

> Complete documentation for the SaveTrainingDataset 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/SaveTrainingDataset/en.md)

This node saves a prepared training dataset to your computer's hard drive. It takes encoded data, which includes image latents and their corresponding text conditioning, and organizes them into multiple smaller files called shards for easier management. The node automatically creates a folder in your output directory and saves both the data files and a metadata file describing the dataset.

## Inputs

| Parameter      | Data Type    | Required | Range       | Description                                                                              |
| -------------- | ------------ | -------- | ----------- | ---------------------------------------------------------------------------------------- |
| `latents`      | LATENT       | Yes      | N/A         | List of latent dicts from MakeTrainingDataset.                                           |
| `conditioning` | CONDITIONING | Yes      | N/A         | List of conditioning lists from MakeTrainingDataset.                                     |
| `folder_name`  | STRING       | No       | N/A         | Name of folder to save dataset (inside output directory). (default: "training\_dataset") |
| `shard_size`   | INT          | No       | 1 to 100000 | Number of samples per shard file. (default: 1000)                                        |

**Note:** The number of items in the `latents` list must exactly match the number of items in the `conditioning` list. The node will raise an error if these counts do not match.

## Outputs

This node does not produce any output data. Its function is to save files to your disk.
