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

# MakeTrainingDataset - ComfyUI Built-in Node Documentation

> 此节点通过编码图像和文本来准备训练数据。

此节点通过编码图像和文本来准备训练数据。它接收一个图像列表及对应的文本标题列表，然后使用 VAE 模型将图像转换为 latent 表示，并使用 CLIP 模型将文本转换为 conditioning 数据。生成的成对 latent 和 conditioning 以列表形式输出，可直接用于训练工作流。

## 输入

| 参数     | 描述                                               | 数据类型   | 是否必需 | 范围                                      |
| ------ | ------------------------------------------------ | ------ | ---- | --------------------------------------- |
| `图像`   | 要编码的图像列表。                                        | IMAGE  | 是    | N/A                                     |
| `VAE`  | 用于将图像编码为 latent 的 VAE 模型。                        | VAE    | 是    | N/A                                     |
| `CLIP` | 用于将文本编码为 conditioning 的 CLIP 模型。                 | CLIP   | 是    | N/A                                     |
| `文本`   | 文本标题列表。长度可为 n（与图像数量匹配）、1（对所有图像重复使用），或省略（使用空字符串）。 | STRING | 否    | 0, 1, or n items (n = number of images) |

**参数约束：**

* `texts` 列表中的项目数量必须为 0、1，或与 `images` 列表中的项目数量完全一致。若为 0，则所有图像均使用空字符串；若为 1，则所有图像重复使用该单一文本；任何其他长度都会引发错误。
* 输出的 `latents` 和 `conditioning` 列表始终包含与 `images` 列表相同数量的项目，因此每个 latent 都与对应标题的 conditioning 配对。

## 输出

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

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

***

**Source fingerprint (SHA-256):** `244adc98810a874cfe42f834e89f96da300d883faeb5791dff19607c13d0c0db`
