> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# 制作训练数据集（MakeTrainingDataset）

<div class="node-meta"><code>MakeTrainingDataset</code><span>model/training</span><span>角色：图像编码</span></div>

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

## 参数

| 参数          | 类型           | 默认 / 范围 | 说明                        |
| ----------- | ------------ | ------- | ------------------------- |
| `images`    | IMAGE · 图像   | —（连线输入） | IMAGE 张量批次，可一次处理多张。       |
| `vae`       | VAE · 自编码器   | —（连线输入） | 用于将图像编码为 latent 的 VAE 模型。 |
| `clip`      | CLIP · 文本编码器 | —（连线输入） | 用于将文本编码为条件数据的 CLIP 模型。    |
| `texts`（选填） | STRING       | 文本      | —                         |

## 输出

| 输出           | 类型           | 说明  |
| ------------ | ------------ | --- |
| latents      | LATENT       | 潜空间 |
| conditioning | CONDITIONING | 条件  |

## 怎么接

- **上游**：LoadImage / VAEDecode
- **下游**：VAEDecode / 下一段采样
- **接线**：把 LoadImage / VAEDecode 出来的 IMAGE 接到 `image`，同家族 VAE 接到 `vae`；输出 LATENT 送进 KSampler 的 `latent_image`——配合 0.4-0.7 的降噪强度就是图生图，先接 SetLatentNoiseMask 则变成局部重绘。

## 使用案例

属于「图像编码」类节点，向下游提供潜空间数据，通常进采样器或解码器。从 `images`、`vae`、`clip` 开始填就能跑起来。典型接法：`LoadImage` → 本节点 → `VAEDecode`。注意：图生图记得把降噪强度调低于 1，否则等于完全重绘。

## 端口与连线示意

![MakeTrainingDataset 端口与连线示意](/svg/MakeTrainingDataset.svg)

## 实战提示

- 图生图记得把降噪强度调低于 1，否则等于完全重绘。

## 同类节点

[加载训练数据集](/nodes/01/LoadTrainingDataset.md) · [绘制损失图](/nodes/01/LossGraphNode.md) · [分辨率 Bucket](/nodes/01/ResolutionBucket.md) · [保存训练数据集](/nodes/01/SaveTrainingDataset.md) · [训练 LoRA](/nodes/01/TrainLoraNode.md)
