Views
No views yet

New in this release: We are releasing the REPA-E E2E-VAE as a fully Hugging Face AutoencoderKL checkpoint — ready to use withdiffusersout of the box.
diffusers API — no extra code or custom wrapper needed.1from diffusers import AutoencoderKL
2
3vae = AutoencoderKL.from_pretrained("REPA-E/e2e-sdvae-hf").to("cuda")Usevae.encode(...)/vae.decode(...)in your pipeline. (A full example is provided below.)
diffusers library:1pip install diffusers>=0.33.0
2pip install torch>=2.3.1diffusers:1from io import BytesIO
2import requests
3
4from diffusers import AutoencoderKL
5import numpy as np
6import torch
7from PIL import Image
8
9
10response = requests.get("https://s3.amazonaws.com/masters.galleries.prod.dpreview.com/2935392.jpg?X-Amz-Expires=3600&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAUIXIAMA3N436PSEA/20251019/us-east-1/s3/aws4_request&X-Amz-Date=20251019T103721Z&X-Amz-SignedHeaders=host&X-Amz-Signature=219dc5f98e5c2e5f3b72587716f75889b8f45b0a01f1bd08dbbc44106e484144")
11device = "cuda"
12
13image = torch.from_numpy(
14 np.array(
15 Image.open(BytesIO(response.content)).resize((512, 512))
16 )
17).permute(2, 0, 1).unsqueeze(0).to(torch.float32) / 127.5 - 1
18image = image.to(device)
19
20vae = AutoencoderKL.from_pretrained("REPA-E/e2e-sdvae-hf").to(device)
21
22with torch.no_grad():
23 latents = vae.encode(image).latent_dist.sample()
24 reconstructed = vae.decode(latents).sample
251@article{leng2025repae,
2 title={REPA-E: Unlocking VAE for End-to-End Tuning with Latent Diffusion Transformers},
3 author={Xingjian Leng and Jaskirat Singh and Yunzhong Hou and Zhenchang Xing and Saining Xie and Liang Zheng},
4 year={2025},
5 journal={arXiv preprint arXiv:2504.10483},
6}