# VAE Encode

<figure><img src="/files/6uUDwbgqOQqq1RU1Mrqg" alt=""><figcaption></figcaption></figure>

## Documentation

* Class name: `VAEEncode`
* Category: `latent`
* Output node: `False`

This node is designed for encoding images into a latent space representation using a specified VAE model. It abstracts the complexity of the encoding process, providing a straightforward way to transform images into their latent representations.

## Input types

<table><thead><tr><th width="127">Parameter</th><th width="133">Comfy dtype</th><th>Description</th></tr></thead><tbody><tr><td><code>pixels</code></td><td><code>IMAGE</code></td><td>The ‘pixels’ parameter represents the image data to be encoded into the latent space. It plays a crucial role in determining the output latent representation by serving as the direct input for the encoding process.</td></tr><tr><td><code>vae</code></td><td><code>VAE</code></td><td>The ‘vae’ parameter specifies the Variational Autoencoder model to be used for encoding the image data into latent space. It is essential for defining the encoding mechanism and characteristics of the generated latent representation.</td></tr></tbody></table>

## Output types

<table><thead><tr><th width="128">Parameter</th><th width="132">Comfy dtype</th><th>Description</th></tr></thead><tbody><tr><td><code>latent</code></td><td><code>LATENT</code></td><td>The output is a latent space representation of the input image, encapsulating its essential features in a compressed form.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.seaart.ai/seaart-comfyui-wiki/core-nodes/latent/vae-encode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
