Abstract
Targeted image editing requires a precise balance between maintaining the integrity of a source image and faithfully integrating new elements from a driver image. Traditional methods often rely on Generative Adversarial Networks (GANs) and complex inversion processes that are computationally expensive and prone to artifacts. This paper introduces E2EVE (End-to-End Visual Editor), a self-supervised transformer model that treats image editing as a conditional probability problem. By training on synthesized edits derived from single images, E2EVE learns to generate highly realistic, localized edits without the need for manual labels or GAN inversion. Our results demonstrate that E2EVE outperforms existing baselines in naturalness, faithfulness, and inference efficiency across multiple domains.
Introduction
Image editing typically involves either global transformations or targeted, local modifications. While text-driven editing has gained popularity, it often lacks the fine-grained control over texture and shape required for professional-grade visual manipulation. Existing image-to-image editing methods frequently utilize GANs, which necessitate "inverting" a real image into a latent space. This inversion process is notoriously difficult, often resulting in a loss of original detail or the introduction of "uncanny" artifacts.
E2EVE addresses these limitations by bypassing the manifold projection step entirely. Instead, it learns the distribution of edits directly through an end-to-end transformer architecture. The goal is to optimize for three key pillars of image editing: naturalness (the result looks like a real photo), locality (the unedited regions remain unchanged), and faithfulness (the edited region accurately reflects the driver image).
Methodology
Self-Supervised Training Strategy
The primary innovation of E2EVE is its training regime, which removes the requirement for a dataset of "before and after" pairs. The authors utilize a self-supervised approach:
- Synthesizing Edits: For any given image, a random region ($R$) is selected. The area outside $R$ is treated as the source, while a transformed sub-crop of the pixels within $R$ is treated as the driver.
- Spatial Decorrelation: To prevent the model from simply learning a trivial reconstruction task, the driver is subjected to random positioning and resizing. This "augmentation sweet spot" forces the model to extract style and features from the driver and blend them intelligently into the source context.
Architecture
E2EVE employs a two-stage generative pipeline:
- Stage 1 (VQ-GAN): Images are compressed into discrete tokens, reducing dimensionality by a factor of 16. This allows the model to handle high-resolution generation within a manageable computational budget.
- Stage 2 (Transformer): A GPT-2 style auto-regressive transformer predicts the missing tokens of the edit region. It is conditioned on the tokens of both the source and the driver.
Notably, the model uses implicit masking. It is not explicitly provided with coordinates for the edit; instead, it infers the region because the source image tokens contain a literal "hole." This enables the model to handle arbitrary and pixel-accurate shapes during inference.
Experimental Setup
The researchers evaluated E2EVE across three distinct, high-stakes domains to test its versatility:
- Dresses-7m: 7 million images of fashion, testing complex textures and structural clothing changes.
- LSUN Bedrooms: 3 million interior images to evaluate spatial geometry and lighting consistency.
- FFHQ: 70,000 high-quality face images to test fine-grained feature blending, such as hair and eyes.
To ensure the model's ability to generalize, benchmarks were also conducted on out-of-distribution data from UnSplash and the Deepfake Detection Challenge (DFDC).
Key Results and Insights
Quantitative and Qualitative Performance
E2EVE consistently outperformed baselines like EdiBERT and various GAN-inversion methods. In quantitative metrics, it achieved superior Naturalness (measured by FID) and Faithfulness (measured via retrieval-based metrics). In a human preference study conducted via Amazon Mechanical Turk, annotators preferred E2EVE’s results for naturalness 83.2% of the time and for faithfulness 80.5% of the time compared to leading baselines.
Efficiency
As a feed-forward transformer, E2EVE is significantly more efficient than optimization-based GAN methods. It achieves a throughput of approximately 0.27 images per second on a single A100 GPU. In contrast, many GAN inversion methods require iterative optimization at test time, making them up to 100 times slower.
Zero-Shot Generalization
A surprising finding was the model's capacity for "out-of-domain" editing. For instance, a model trained on the Dresses-7m dataset could use a driver image of a sunset to generate a dress with that specific color palette and texture, demonstrating a robust understanding of style transfer beyond simple pixel copying.
Discussion and Limitations
While E2EVE represents a significant step forward, it is not without limitations. Because the model lacks a high-level "world model," it can occasionally produce semantically unreasonable results—such as misplacing anatomical features—if the driver and source are extremely misaligned. Additionally, the model is subject to the inherent biases of its training datasets.
Future work may involve scaling this framework to 3D scenes or video editing, where the challenges of maintaining temporal and spatial consistency across frames remain an open area of research.
Summary updated