One Layer Is Enough: Adapting Pretrained Visual Encoders for Image Generation

Yuan Gao, Chen Chen, Tianrong Chen, Jiatao Gu
12/8/2025
cs.CVcs.AI

No official code found. Best implementation: eren23/one_layer_image_gen (15 stars, PyTorch, last commit 2025-12-20).

Abstract

Visual generative models (e.g., diffusion models) typically operate in compressed latent spaces to balance training efficiency and sample quality. In parallel, there has been growing interest in leveraging high-quality pre-trained visual representations, either by aligning them inside VAEs or directly within the generative model. However, adapting such representations remains challenging due to fundamental mismatches between understanding-oriented features and generation-friendly latent spaces. Representation encoders benefit from high-dimensional latents that capture diverse hypotheses for masked regions, whereas generative models favor low-dimensional latents that must faithfully preserve injected noise. This discrepancy has led prior work to rely on complex objectives and architectures. In this work, we propose FAE (Feature Auto-Encoder), a simple yet effective framework that adapts pre-trained visual representations into low-dimensional latents suitable for generation using as little as a single attention layer, while retaining sufficient information for both reconstruction and understanding. The key is to couple two separate deep decoders: one trained to reconstruct the original feature space, and a second that takes the reconstructed features as input for image generation. FAE is generic; it can be instantiated with a variety of self-supervised encoders (e.g., DINO, SigLIP) and plugged into two distinct generative families: diffusion models and normalizing flows. Across class-conditional and text-to-image benchmarks, FAE achieves strong performance. For example, on ImageNet 256x256, our diffusion model with CFG attains a near state-of-the-art FID of 1.29 (800 epochs) and 1.70 (80 epochs). Without CFG, FAE reaches the state-of-the-art FID of 1.48 (800 epochs) and 2.08 (80 epochs), demonstrating both high quality and fast learning.

View on arXivView PDF

Code Implementations(1)

PyTorch

A PyTorch implementation replicating the core logic of FAE (Feature Auto-Encoder) from the paper "One Layer Is Enough: Adapting Pretrained Visual Encoders for Image Generation" (arXiv:2512.07829).

150Jupyter NotebookDec 16, 202510 months ago
aiautoencoderdeep-learningdiffusion-modelsfeature-extraction+7 more

Similar Papers

Cite this paper

@article{gao2025layer,
  title  = {One Layer Is Enough: Adapting Pretrained Visual Encoders for Image Generation},
  author = {Yuan Gao and Chen Chen and Tianrong Chen and Jiatao Gu},
  year   = {2025},
  eprint = {2512.07829},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.07829v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2512.07829.svg)](https://codeofpaper.com/paper/2512.07829)

Discussion