Nodes/CRT-Nodes/Tiny FLUX.2 VAE Encode (CRT)
ComfyUI Node

Tiny FLUX.2 VAE Encode (CRT)

The FLUX.2 VAE encode that keeps up with your previews

By PGCRT·Created 2 years ago·Updated 2 months ago· 123
Tiny FLUX.2 VAE Encode (CRT)
  • image
  • tiny_vae
  • LATENT

FLUX.2's full VAE is a serious piece of machinery. It's accurate, but it's also slow enough that encoding an image just to check a preview can dominate your latency budget. This node is the shortcut: it runs a tiny autoencoder that approximates the full FLUX.2 encode about 10× faster. You use it when you want a latent fast, and you're fine with it being slightly lossy.

That's the honest trade, and it's the right one more often than you'd think. The tiny VAE exists so you can prototype an edit or preview a result without paying full-VAE time on every pass. When you're happy with the direction, the heavy encode is a one-time cost at the end.

How it works

Under the hood it's a FLUX.2-Tiny-AutoEncoder from fal's HuggingFace repo, wrapped to match the FLUX.2 (Klein) latent format. The trick: it uses a diffusers AutoencoderTiny (32 channels, 8× downscale) and then a stride-2 conv maps that to 128 channels and pushes it to a 16× downscale. Result is a 128-channel latent at H/16 × W/16 - the same shape the full FLUX.2 VAE produces, which is what makes it a drop-in for the real thing.

The encode itself is unremarkable: image is permuted to (B, C, H, W), scaled to [-1, 1], pushed through the model. All the interesting part is the model, not the node.

Inputs and outputs

Only two inputs, and you need both:

  • image (IMAGE) - the frames or stills you want to encode.
  • tiny_vae (TINY_FLUX2_VAE) - this is the catch. You can't wire a normal VAE here. You need the companion Tiny FLUX.2 VAE Loader node from the same pack, which loads the weights into this custom type.

It outputs a single LATENT, which feeds straight into whatever you'd give a full-VAE latent to: a KSampler, an image-editing workflow, a batch. That's the whole interface.

Installing it

This is a conditional node, which means it only registers if its dependencies are present. Two things have to be true:

  1. diffusers has to be installed in ComfyUI's Python environment. The node's source literally raises pip install diffusers at you if it isn't.
  2. The model file diffusion_pytorch_model.safetensors has to live in ComfyUI/models/vae_approx/FLUX.2-Tiny-AutoEncoder/.

The pack doesn't auto-download this one, so grab it from https://huggingface.co/fal/FLUX.2-Tiny-AutoEncoder and drop it in that folder. If you install CRT-Nodes via ComfyUI Manager (search "CRT-Nodes") or git clone https://github.com/PGCRT/CRT-Nodes.git into custom_nodes, then restart ComfyUI, the loader will show a [NOT FOUND] label until the weights are there - that's your cue to fetch them.

Where people get burned

The node simply won't appear in your node list if diffusers is missing, so "I can't find Tiny FLUX.2 VAE Encode" and "diffusers isn't installed" are usually the same problem. The other trap is treating it as lossless. It's an approximation - great for previews and rapid iteration, but if you're saving latents for a final output or looping them back through the full VAE, use the real encode. Matching the latent format doesn't mean matching the latent contents bit-for-bit.

CategoryCRT/Flux2

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
tiny_vaeTINY_FLUX2_VAE

Outputs (1)

NameTypeDescription
LATENTLATENT