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

# ReferenceMultiLatent - ComfyUI Built-in Node Documentation

> 此节点对一个或多个参考图像进行编码，并将其 latent 附加到编辑模型所使用的条件中。

此节点对一个或多个参考图像进行编码，并将其 latent 附加到编辑模型所使用的条件中。它是 Set Reference Latent 的多图像对应节点：你连接一个 VAE 以及一组参考图像，该节点会将每个编码后的 latent 附加到正向条件，并且当连接了负向条件时，也会附加到负向条件。当模型期望一次使用多张参考图像而不是单个 latent 时，请使用它。

## 输入

### 通用输入

| 参数 | 描述 | 数据类型 | 必填 | 范围 |
| - | - | - | - | - |
| `positive` | 要使用参考 latent 修改的正向条件。 | CONDITIONING | 是 | - |
| `negative` | 可选的负向条件，会接收相同的参考 latent。保持未连接，以在 `negative` 输出上复用修改后的正向条件。 | CONDITIONING | 否 | - |
| `vae` | 用于编码已连接参考图像的 VAE。只要至少连接了一张图像，它就是必填项，否则节点会报错。 | VAE | 否 | - |
| `resolution` | 每张参考图像在编码前的准备方式。`"keep resolution"` 会按传入尺寸进行编码；`"resize"` 会将其缩放到目标百万像素数，同时保持宽高比，这会显示 `megapixels`。（默认值："keep resolution"） | DYNAMIC\_COMBO | 是 | `"keep resolution"`<br />`"resize"` |
| `images` | 可增长槽位：连接一个或多个参考图像（`image_1`、`image_2`、...）以用作参考。图像会按槽位顺序编码，并按该顺序附加到条件中。 | IMAGE | 否 | 1 到 100 |

### Resize 输入

当 `resolution` 设置为 `"resize"` 时，会出现这些选项。

| 参数 | 描述 | 数据类型 | 必填 | 范围 |
| - | - | - | - | - |
| `megapixels` | 每张参考图像的目标大小，同时保持宽高比。1.0 大约为 1024 x 1024 像素。（默认值：1.0） | FLOAT | 是 | 0.01 到 16.0 |

## 输出

| 输出名 | 描述 | 数据类型 |
| - | - | - |
| `positive` | 附加了编码后参考 latent 的正向条件。 | CONDITIONING |
| `negative` | 附加了相同参考 latent 的负向条件。当未连接负向条件时，返回 `positive` 输出。 | CONDITIONING |
| `empty_latent` | 第一个参考 latent 乘以 0.0，可用于初始化采样器。当未连接参考图像时为空。 | LATENT |

## 说明

* latent 是追加的，而不是替换的，因此串联多个 Set Reference Multi Latent 节点会累积参考。
* 每张连接的图像都会单独编码，因此参考图像不必具有相同尺寸。
* 未连接任何图像时，`positive` 和 `negative` 会原样返回，且 `empty_latent` 为空。

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

***

**Source fingerprint (SHA-256):** `7416feb8ac81cbf7e2d424e0212e88ab60235958c64550b0ee8c303093673756`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.