---
title: "Remote VAEs for decoding with Inference Endpoints 🤗"
description: "Hugging Face's Diffusers team is piloting remote VAE decoding: a diffusion pipeline produces latents locally and sends them to a hosted Inference Endpoint for decoding, avoiding the VRAM spike that otherwise forces offloading (adding transfer latency) or tiling (which can hurt image quality and, for SD v1.5 at 1024x1024, raises decode time by roughly 60-100%)."
url: "https://swe.quest/articles/remote-vaes-for-decoding-with-inference-endpoints-c03a090742417e81"
canonical: "https://huggingface.co/blog/remote_vae"
source: "Hugging Face"
published: "2025-02-24"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 8
tags: ["inference","computer-vision","machine-learning","python"]
---

# Remote VAEs for decoding with Inference Endpoints 🤗

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2025-02-24, 8 min read, Announcement. Original: [https://huggingface.co/blog/remote\_vae](https://huggingface.co/blog/remote_vae)

## Summary

Hugging Face's Diffusers team is piloting remote VAE decoding: a diffusion pipeline produces latents locally and sends them to a hosted Inference Endpoint for decoding, avoiding the VRAM spike that otherwise forces offloading (adding transfer latency) or tiling (which can hurt image quality and, for SD v1.5 at 1024x1024, raises decode time by roughly 60-100%). A \`remote\_decode\` helper in diffusers supports SD v1, SDXL, Flux (packed latents need height/width) and HunyuanVideo (mp4 output), and a background thread with a queue lets generation overlap with decoding. Benchmark tables show local VAE decode memory reaching 93-96% of VRAM on RTX 3080/3070 for SDXL at 1024x1024.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Computer vision](https://swe.quest/tags/computer-vision.md) (AI & ML)
- [Machine learning](https://swe.quest/tags/machine-learning.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- latent diffusion models
- PyTorch basics
- Diffusers pipelines

## Keywords

Diffusers, Hugging Face Inference Endpoints, VAE, Stable Diffusion, Flux, HunyuanVideo, SDXL

## Related posts

- [State of open video generation models in Diffusers](https://swe.quest/articles/state-of-open-video-generation-models-in-diffusers-9770186e8fdb5a0a.md): Hugging Face · 2025-01-27 · Medium · 16 min read · Inference & serving, Computer vision, Video & media, Performance engineering, Model training
  Open video generation models such as HunyuanVideo, CogVideoX, LTX-Video, Mochi-1 and Allegro share a common architecture: T5-style text encoders, a DiT-based denoiser over 3D spatio-temporal tokens, a spatially and temporally compressing VAE, and a scheduler.
- [Stable Diffusion with 🧨 Diffusers](https://swe.quest/articles/stable-diffusion-with-diffusers-03ca8448e680e397.md): Hugging Face · 2022-08-22 · Medium · 15 min read · Computer vision, Inference & serving, Machine learning, Python
  Stable Diffusion is a latent diffusion model that denoises compressed 64×64 latents rather than pixels, combining a VAE, a text-conditioned U-Net with cross-attention, and a frozen CLIP text encoder.
- [Goodbye cold boot - how we made LoRA Inference 300% faster](https://swe.quest/articles/goodbye-cold-boot-how-we-made-lora-inference-300-faster-d8d4cf4c16c22df2.md): Hugging Face · 2023-12-05 · Medium · 9 min read · Inference & serving, ML platforms, Computer vision, Python
  Hugging Face's Inference API now keeps Stable Diffusion base models warm and swaps LoRA adapters per request, so hundreds of distinct LoRAs share a few GPUs instead of each getting a dedicated deployment.
- [Diffusers welcomes Stable Diffusion 3.5 Large](https://swe.quest/articles/diffusers-welcomes-stable-diffusion-3-5-large-23c0b39797ac94ee.md): Hugging Face · 2024-10-22 · Medium · 6 min read · Computer vision, Inference & serving, Model training, Python
  Stable Diffusion 3.5 Large (8B) and a timestep-distilled Turbo variant are now usable in Diffusers.
- [Exploring Quantization Backends in Diffusers](https://swe.quest/articles/exploring-quantization-backends-in-diffusers-11e0d1ba0cf15851.md): Hugging Face · 2025-05-21 · Medium · 11 min read · Inference & serving, Computer vision, Python, Performance engineering
  Hugging Face Diffusers supports several quantization backends (bitsandbytes, torchao, Quanto, GGUF and native FP8 layerwise casting) that shrink large diffusion models such as Flux-dev, whose full BF16 pipeline needs about 31 GB.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
