Abstract
Recent advancements in controllable image generation have been largely dominated by diffusion-based architectures. However, these models often require specialized adapters or complex inversion processes to handle diverse conditioning tasks. This paper introduces EditAR, a unified autoregressive (AR) framework that treats image editing and translation as a single next-token prediction task. By leveraging discrete visual tokenization and a novel feature distillation loss from DINOv2, EditAR achieves state-of-the-art performance across a variety of benchmarks, demonstrating that the autoregressive paradigm can effectively unify complex vision-language tasks without task-specific modifications.
1. Introduction
The landscape of generative vision has seen a paradigm shift with the success of diffusion models. While effective, these models typically rely on task-specific "adapters" (e.g., ControlNet) or time-intensive optimization-based inversion techniques to perform precise image editing. This fragmentation poses a challenge for creating a truly unified generative model.
In the domain of Natural Language Processing (NLP), Large Language Models (LLMs) have demonstrated that an autoregressive "next-token prediction" approach can unify disparate tasks into a single sequence-to-sequence framework. EditAR applies this philosophy to the visual domain. By tokenizing images and instructions into a shared sequence, EditAR handles both image editing (e.g., object swapping) and image translation (e.g., sketch-to-image) within a "vanilla" transformer architecture.
2. Methodology
EditAR is built upon the LlamaGen architecture and consists of three core pillars:
2.1 Tokenization and Unified Input
The framework utilizes a VQ-VAE to map image patches into discrete token indices, effectively treating images as sequences of "visual words." During training and inference, the model is "prefilled" with tokens from a conditioning image (such as a depth map or a source photo) and latent embeddings from a text instruction. The target image is then generated by predicting the subsequent tokens in an autoregressive manner.
2.2 Feature Distillation with DINOv2
A common challenge for AR models in vision is maintaining semantic consistency and precise localization. To address this, EditAR incorporates a distillation loss that aligns the transformer's latent features with those of DINOv2, a powerful self-supervised foundation model. This alignment provides the model with high-level semantic understanding, allowing it to better distinguish between objects and execute localized edits more accurately.
2.3 Inference and Guidance
To ensure fidelity to both the visual condition and the textual instruction, EditAR employs Classifier-Free Guidance (CFG). This technique is applied to both the image and text conditions during the sampling process, balancing the creativity of the model with the constraints provided by the user.
3. Experiments and Evaluation
The model was trained on a massive collection of paired data to ensure broad generalization:
- Image Editing: 1.5M examples from SEED-Data-Edit-Unsplash and 1.8M examples from the PIPE dataset (specifically for object addition and removal).
- Image Translation: COCOStuff (segmentation-to-image) and MultiGen-20M (canny edge and depth-to-image).
Evaluation was conducted using PIE-Bench, a comprehensive benchmark of 700 images covering ten distinct editing categories, including style transfer, color modification, and object replacement.
4. Results and Discussion
EditAR demonstrates strong competitive performance against specialized state-of-the-art (SOTA) models.
4.1 Image Editing Performance
On PIE-Bench, EditAR emerged as the top-performing feed-forward method, narrowing the gap with much slower optimization-based inversion techniques. Notably, it achieved a Structure Distance of 39.43, indicating superior preservation of the original image's spatial layout. Unlike diffusion models that require iterative inversion, EditAR’s feed-forward nature allows for significantly faster inference.
4.2 Image Translation Performance
In translation tasks like edge-to-image and depth-to-image, EditAR outperformed unified diffusion baselines such as UniControl and UniControlNet. In Canny-to-image tasks, EditAR achieved a Fréchet Inception Distance (FID) of 13.91, outperforming ControlNet++ (18.23). These results suggest that the AR approach produces higher image quality and greater diversity in generated outputs.
4.3 Qualitative Advantages
Qualitative analysis reveals that EditAR is less susceptible to the "exaggerated edits" or background distortions often seen in feed-forward diffusion models like InstructPix2Pix. The integration of DINOv2 features appears to be a critical factor in this improved stability and semantic grounding.
5. Conclusion and Future Work
EditAR represents a significant step toward a unified visual foundation model. By demonstrating that a single autoregressive transformer can match or exceed the performance of specialized diffusion models, it validates the "everything is a token" approach for complex vision tasks.
Future research will focus on overcoming current limitations, such as the dependency on VQ-VAE resolution and the difficulty of handling complex 3D transformations. Additionally, the authors view this as a milestone for scaling AR models into even more powerful, all-in-one visual foundation models.
Summary updated