# Set Reference Multi Latent

This node encodes one or more reference images and appends their latents to the conditioning that an edit model consumes. It is the multi-image counterpart of Set Reference Latent: you connect a VAE plus a set of reference images, and the node attaches every encoded latent to the positive conditioning and, when one is connected, to the negative conditioning as well. Use it when a model expects several reference images at once instead of a single latent.

## Inputs

### Common Inputs

| Parameter | Description | Data Type | Required | Range |
| --- | --- | --- | --- | --- |
| `positive` | The positive conditioning to modify with the reference latents. | CONDITIONING | Yes | - |
| `negative` | Optional negative conditioning that receives the same reference latents. Leave it unconnected to reuse the modified positive conditioning on the `negative` output. | CONDITIONING | No | - |
| `vae` | The VAE used to encode the connected reference images. When no VAE is connected the reference images are ignored. | VAE | No | - |
| `resolution` | How each reference image is prepared before encoding. `"keep resolution"` encodes it at its incoming size; `"resize"` scales it to a target megapixel count while preserving the aspect ratio, which reveals `megapixels`. (default: "keep resolution") | DYNAMIC_COMBO | Yes | `"keep resolution"`<br>`"resize"` |
| `images` | Growable slot: connect one or more reference images (`image_1`, `image_2`, ...) to use as references. Images are encoded in slot order and appended to the conditioning in that order. | IMAGE | No | 1 to 100 |

### Resize Inputs

These options appear when `resolution` is set to `"resize"`.

| Parameter | Description | Data Type | Required | Range |
| --- | --- | --- | --- | --- |
| `megapixels` | Target size of each reference image, preserving aspect ratio. 1.0 is about 1024 x 1024 pixels. (default: 1.0) | FLOAT | Yes | 0.01 to 16.0 |

## Outputs

| Output Name | Description | Data Type |
| --- | --- | --- |
| `positive` | The positive conditioning with the encoded reference latents appended. | CONDITIONING |
| `negative` | The negative conditioning with the same reference latents appended. Returns the positive output when no negative conditioning is connected. | CONDITIONING |
| `empty_latent` | The first reference latent multiplied by 0.0, ready to seed a sampler. When no reference latent is produced, a square empty latent at the selected resolution is returned instead. | LATENT |

## Notes

- The latents are appended rather than replaced, so chaining several Set Reference Multi Latent nodes accumulates references.
- Each connected image is encoded on its own, so the reference images do not have to share a size.
- Without a connected VAE or without any connected image, `positive` and `negative` are returned unchanged and `empty_latent` is a square empty latent: 1024 x 1024, or sized from `megapixels` when `resolution` is `"resize"`.

> 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/ReferenceMultiLatent/en.md)

---
**Source fingerprint (SHA-256):** `06f98e7c21e8750a2bdf365cb80fac990bcf01246f183c60ef83bd195fc1225b`
