E2GAN: Efficient Training of Efficient GANs for Image-to-Image Translation

Yifan Gong, Zheng Zhan, Qing Jin, Yanyu Li, Yerlan Idelbayev, Xian Liu, Andrey Zharkov, Kfir Aberman, Sergey Tulyakov, Yanzhi Wang, Jian Ren

Large-scale text-to-image diffusion models have revolutionized image editing, but their immense computational demands make real-time mobile interaction impossible. While Generative Adversarial Networks (GANs) are much faster and mobile-friendly, they suffer from a "specialization" problem: a GAN trained for one task cannot easily perform another. Traditionally, this meant training a new model from scratch for every single editing concept—a slow process that creates a storage nightmare for mobile devices.

$E^2GAN$ bridges this gap by asking: Can we make the distillation process so efficient that adding a new editing concept is nearly instantaneous and takes up negligible space? By combining a pre-trained base model, Low-Rank Adaptation (LoRA), and a novel data selection strategy, the authors achieve up to a 33x reduction in training time and an 869x reduction in storage costs while maintaining superior image quality.

Methodology: A Three-Pronged Approach to Efficiency

The $E^2GAN$ framework relies on three core innovations to streamline the training and deployment pipeline:

  1. Base GAN Construction: Instead of training from scratch, $E^2GAN$ utilizes a "Base Generator" trained on a diverse set of representative concepts. This model incorporates Transformer Blocks (TBs) with self- and cross-attention alongside standard ResNet blocks to better understand global structures and text prompts.
  2. LoRA on Crucial Layers: Through a crucial weights analysis, the authors discovered that fine-tuning the entire model is unnecessary. They identified Sampling Layers (SL) and Transformer Blocks (TB) as the most vital components for adapting to new styles. By applying Low-Rank Adaptation (LoRA) exclusively to these layers, they reduce the number of trainable parameters to just ~1% of the total model.
  3. Similarity Clustering (SC): To accelerate training, the researchers found that data diversity trumps raw volume. They use K-means clustering on image embeddings to select a small, diverse subset of "essential" training data. This allows the model to converge faster without losing its generalization power.

Key Results and Performance

$E^2GAN$ significantly outperforms existing baselines across speed, efficiency, and quality metrics, effectively positioning GANs as the ideal "mobile runtime" for the knowledge trapped inside massive diffusion models.

Training and deployment comparison showing E2GAN's efficiency gains over conventional methods.
  • Inference Speed: $E^2GAN$ achieves a latency of just 15.5 ms on an iPhone 14 Pro, enabling true 30-FPS real-time editing. This is vastly superior to standard pix2pix (21.0 ms) and orders of magnitude faster than diffusion models (>1900 ms).
  • Training Efficiency: Training a new concept takes only 200 seconds on an H100 GPU, compared to 6600 seconds for previous distillation methods.
  • Storage Savings: Because only the LoRA weights are saved for new concepts, the storage requirement plummets from ~79M parameters to just 0.092M—an incredible 869x reduction.
  • Visual Quality: Despite these massive efficiency gains, $E^2GAN$ achieves better FID scores than pix2pix, meaning the generated images are more realistic and better aligned with the target prompts.

Limitations and Future Work

The primary limitation of $E^2GAN$ is the "Teacher Bottleneck." Because the model learns by distilling knowledge from diffusion models, it inherently inherits their mistakes. If a teacher diffusion model generates artifacts or fails to follow a complex prompt, the distilled GAN will likely replicate those errors.

Future work will focus on developing more robust automated pipelines for creating high-quality paired datasets, exploring further compression techniques for lower-end mobile hardware, and addressing the ethical implications of real-time, high-fidelity image manipulation.

Summary updated

BibTeX
@inproceedings{gong2024e,
  author = {Yifan Gong and Zheng Zhan and Qing Jin and Yanyu Li and Yerlan Idelbayev and Xian Liu and Andrey Zharkov and Kfir Aberman and Sergey Tulyakov and Yanzhi Wang and Jian Ren},
  title = {{E2GAN: Efficient Training of Efficient GANs for Image-to-Image Translation}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=lrPrkWXqzd},
}
Figure