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.

By Winlensky·Created a day ago·Updated about 12 hours ago· 1
📥 LDM VAE Encode
  • pixels
  • vae
  • LATENT
vae_scale0.1822
CategoryLDM

Inputs (3)

NameTypeDefaultDescription
pixelsIMAGEInput image in [0, 1] range (e.g. from Load Image). Conversion to [-1, 1] is handled internally.
vaeLDM_VAEVAE output from Load LDM Checkpoint.
vae_scaleFLOAT0.18220.01–1Latent scaling factor. Must match the value used in VAE Decode (default 0.18215 for f8 VAE).

Outputs (1)

NameTypeDescription
LATENTLDM_LATENT