ComfyUI Node
📥 LDM VAE Encode
Encodes an image into latent space using the f8 VAE encoder. The input image (expected in [0, 1]) is converted to [-1, 1] range, passed through the encoder, and the mean of the posterior distribution is taken (deterministic, no stochastic sampling). The resulting latent is multiplied by vae_scale (0.18215) to match the UNet's operating space. Feed the output into the Sampler with denoise < 1.0 for img2img workflows.
📥 LDM VAE Encode
- pixels
- vae
- LATENT
◄vae_scale0.1822►
CategoryLDM
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| pixels | IMAGE | Input image in [0, 1] range (e.g. from Load Image). Conversion to [-1, 1] is handled internally. | |
| vae | LDM_VAE | VAE output from Load LDM Checkpoint. | |
| vae_scale | FLOAT | 0.18220.01–1 | Latent scaling factor. Must match the value used in VAE Decode (default 0.18215 for f8 VAE). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LDM_LATENT | — |