ComfyUI Node

Load TAEF2

The 10 MB VAE that turns 8K Flux.2 decodes from OOM into fine

By tensorforger·Created 3 months ago·Updated 3 months ago· 22
Load TAEF2
    • VAE
    model_name

    Flux.2's real VAE is enormous and slow, and the moment you chain Flow Upscaler up to 4K or 8K, decoding with it becomes the bottleneck - or an outright OOM. LoadTAEF2 is the fix: it loads TAEF2, madebyollin's Tiny AutoEncoder for Flux.2, as a drop-in ComfyUI VAE. The whole file is about 10 MB, and it decodes huge latents in a blink. The demo workflow uses it exactly that way - the original image decodes with the full flux2-vae, the upscaled one decodes with TAEF2, and the rgthree Image Comparer lets you slide between them.

    Why an approximate VAE. "Tiny AutoEncoder" is the point. madebyollin started the TAESD line as preview decoders for SD/SDXL/Flux.1 - VAEs small enough to render a live preview while you're still generating. TAEF2 is the Flux.2 member of the family: a 32-channel latent space with 32x spatial downsampling, plus batch-norm/group-norm tweaks in the flux_2 variant so it tracks the real VAE's latent space closely enough for distillation work. This pack wraps it in a standard ComfyUI VAE wrapper, so you plug it into any VAEDecode exactly like the real thing.

    You get speed for a small quality compromise. It's an approximation, not a clone - don't reach for it on a pixel-perfect final when the real VAE fits in VRAM. But the author's explicit recommendation (and the workflow's own note) is that above 2048×2048 the full VAE becomes impractical, and at 8K it's the difference between a long wait and possibly OOMing versus just decoding. For a compare slider, a batch job, or a real-time FluxRT-style pipeline, it's the one you'd reach for.

    Inputs and outputs:

    • model_name - dropdown of .safetensors files in ComfyUI/models/vae_approx.
    • Output is a standard VAE, wired straight into VAEDecode.

    Install. Same pack as the rest of this family: search comfyui-flow-upscaler in ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/TensorForger/comfyui-flow-upscaler
    

    Then download taef2.safetensors (~10 MB) from huggingface.co/madebyollin/taef2 and drop it into models/vae_approx (create the folder if needed - it's the standard home of tiny approximation VAEs; ComfyUI uses the same folder for its preview decoders). Restart.

    Gotchas. Only decode Flux.2 latents with it - it's a 32-channel Flux.2 VAE, so SDXL/Flux.1 latents are a non-starter. An empty dropdown means the file is in the wrong folder or not .safetensors. And remember it's approximate: if output looks slightly off at moderate sizes, try the full VAE before blaming the model.

    Categoryvae

    Inputs (1)

    NameTypeDefaultDescription
    model_nameCOMBO0 options:

    Outputs (1)

    NameTypeDescription
    VAEVAE