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

# MakeTrainingDataset - ComfyUI Built-in Node Documentation

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

> 本文档由 AI 生成。如果您发现任何错误或有改进建议，欢迎贡献！ [在 GitHub 上编辑](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/MakeTrainingDataset/zh.md)

此节点通过编码图像和文本来准备训练数据。它接收图像列表和对应的文本描述列表，然后使用 VAE 模型将图像转换为潜在表示，并使用 CLIP 模型将文本转换为条件数据。最终输出的配对潜在表示和条件数据以列表形式呈现，可直接用于训练工作流。

## 输入参数

| 参数名      | 数据类型   | 必填 | 取值范围 | 描述                                               |
| -------- | ------ | -- | ---- | ------------------------------------------------ |
| `images` | IMAGE  | 是  | N/A  | 待编码的图像列表。                                        |
| `vae`    | VAE    | 是  | N/A  | 用于将图像编码为潜在表示的 VAE 模型。                            |
| `clip`   | CLIP   | 是  | N/A  | 用于将文本编码为条件数据的 CLIP 模型。                           |
| `texts`  | STRING | 否  | N/A  | 文本描述列表。长度可以是 n（与图像数量匹配）、1（为所有图像重复使用）或省略（使用空字符串）。 |

**参数约束：**

* `texts` 列表中的项目数必须为 0、1，或与 `images` 列表中的项目数完全匹配。如果为 0，则所有图像都使用空字符串。如果为 1，则该单一文本会为所有图像重复使用。

## 输出结果

| 输出名称           | 数据类型         | 描述       |
| -------------- | ------------ | -------- |
| `latents`      | LATENT       | 潜在字典列表。  |
| `conditioning` | CONDITIONING | 条件列表的列表。 |
