VAE Encoder PoP
An encoder with its own VAE loader baked in
- pixels
- samples
Normally, getting a pixel image into latent space in ComfyUI takes two nodes: a VAELoader to load your VAE file, and a VAEEncode to actually do the encoding, with a wire connecting them. VAEEncoderPoP folds both jobs into one node - pick your VAE by name right on the encoder itself, no separate loader node, no extra wire. The author's own reason for building it, from the README, is refreshingly honest: "I realize there are other nodes like this, but I wanted to better understand how the encoding and decoding processes worked, so made my own."
How it works
VAE encoding is the mechanism that turns a pixel image into the compressed latent representation your diffusion model actually samples in - it's the step between "an image you can see" and "the tensor your KSampler works on." This node loads the VAE you name, then runs the standard encode against your input pixels. The useful detail, and one the README specifically calls out: the loaded VAE is cached by file path behind the scenes, so if you use the same vae_name here and in VAEDecoderPoP elsewhere in your graph, it only gets loaded into memory once rather than twice. That's a real, if small, VRAM/RAM saving if your workflow does both an encode and a decode pass with the same VAE.
The inputs and outputs that matter
pixels- your input image, whatever you're encoding into latent space (an img2img source, a ControlNet-conditioned input, anything).vae_name- pick from your installed VAE files. Same rule as any VAE-selecting node: the file needs to be sitting in ComfyUI'smodels/vaefolder for it to show up in the list.- Output is
samples, aLATENT- wire it into your KSampler's latent input for img2img, or anywhere else a LATENT is expected.
How to install it
ComfyUI Manager: search "comfy_PoP", install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/picturesonpictures/comfy_PoP
No extra dependencies - it wraps ComfyUI's own VAE-loading and encoding calls, nothing new to install. You do need an actual VAE file on disk, though; the node itself doesn't ship or download one.
Common issues & troubleshooting
vae_name dropdown is empty. You don't have a VAE file in models/vae yet. Which file you need depends on your model family - SD 1.5 commonly uses vae-ft-mse-840000-ema-pruned, while Flux and most newer architectures ship their own VAE alongside the checkpoint. Many modern checkpoints (SDXL, Flux) already bake a VAE into the checkpoint file itself, in which case you may not need this node at all unless you specifically want to swap in a different one.
Output looks grey, washed out, or desaturated after a round-trip. That's the classic symptom of a missing or mismatched VAE - either the wrong VAE for your model family, or none loaded at all. Double-check vae_name points at a VAE built for the same architecture as your checkpoint; a VAE from one model family fed pixels meant for another produces flat color or noise, not a subtly-wrong image.
Memory usage higher than expected with both encoder and decoder in the graph. Make sure vae_name matches exactly between this node and VAEDecoderPoP - the caching only kicks in on an exact match, so a typo or a different filename string means you're paying for two loaded VAEs instead of one.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| pixels | IMAGE | — | |
| vae_name | COMBO | 0 options: |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| samples | LATENT | — |