Skip to content
milmorPublic

About

[ECCV 2026 Workshop LIMIT] Efficient generative adversarial networks using linear additive-attention Transformers

Topics

Resources

Stars

9 stars

Watchers

1 watching

Forks

Latest commit

 

History

74 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LadaGAN

This repo is the official implementation of "Efficient generative adversarial networks using linear additive-attention Transformers" (ECCV 2026 Workshop LIMIT).

By Emilio Morales-Juarez and Gibran Fuentes-Pineda.

Abstract

Although deep generative models such as Diffusion Models (DMs) and Generative Adversarial Networks (GANs) achieve remarkable image generation performance, they often rely on computationally expensive architectures that limit accessibility and increase training and inference costs. We introduce LadaGAN, a hybrid Transformer-convolutional GAN built around Ladaformer, an efficient linear-attention Transformer block. Its linear additive-attention mechanism computes a single attention vector per head, avoiding the quadratic complexity of dot-product attention. By combining Ladaformer with convolutional layers in both the generator and discriminator, LadaGAN reduces computational complexity while improving the training stability of Transformer-based GANs. LadaGAN matches or surpasses the compared convolutional and Transformer GANs on benchmark datasets while being substantially more efficient, and remains competitive with multi-step generative models using orders of magnitude fewer computational resources. While maintaining competitive FID scores, LadaGAN achieves over 600x higher inference throughput than ADM (333 vs. 0.50 images/s on CelebA 64x64) and requires over 100x fewer FLOPs. Unlike one-step Consistency Models, LadaGAN can be trained efficiently on a single GPU.

Implementations

This repository provides two implementations of LadaGAN:

Both implementations are feature-complete and produce equivalent results. Choose the one that best fits your workflow.

Quick Start

TensorFlow:

cd tensorflow
python train.py --file_pattern=./data_path/*png --eval_dir=./eval_path/*png

PyTorch:

cd pytorch
python train.py --data_dir ./data_path --fid_real_dir ./eval_path

For detailed instructions, dependencies, and usage, please refer to the README files in each implementation directory:

FLOPs

Training on CIFAR-10 and CelebA using a single 12GB GPU (RTX 3080 Ti) takes less than 40 hours. Note that these results and the experiments reported in the paper were obtained using the TensorFlow implementation of LadaGAN, which runs twice as fast as the PyTorch implementation due to XLA.

Model (CIFAR 10 32x32) ADM-IP (80 steps) StyleGAN2 VITGAN LadaGAN
GPUs Tesla V100 x 2 - - RTX 3080 Ti x 1
#Images 69M - - 68M
#Params 57M - - 19M
FLOPs 9.0B - - 0.7B
FID 2.93 5.79 4.57 3.29
Model (CelebA 64x64) ADM-IP (80 steps) StyleGAN2 VITGAN LadaGAN
GPUs Tesla V100 x 16 - - RTX 3080 Ti x 1
#Images 138M - - 72M
#Params 295M 24M 38M 19M
FLOPs 103.5B 7.8B 2.6B 0.7B
FID 2.67 - 3.74 1.81
Model (FFHQ 128x128) ADM-IP (80 steps) StyleGAN2 VITGAN LadaGAN
#Images 61M - - 53M
#Params 543M - - 24M
FLOPs 391.0B 11.5B 11.8B 4.3B
FID 6.89 - - 4.48

Hyperparameters

Adjust hyperparameters in the config.py file within each implementation directory.

Implementation Notes

  • This model depends on other files that may be licensed under different open source licenses.
  • LadaGAN uses Differentiable Augmentation. Under BSD 2-Clause "Simplified" License.
  • FID evaluation.
  • TensorFlow implementation: Efficient patch generation with XLA.

Demo

Open In Colab

Attention maps

Single head maps training progress:

BibTeX

@article{morales2024efficient,
  title={Efficient generative adversarial networks using linear additive-attention Transformers},
  author={Morales-Juarez, Emilio and Fuentes-Pineda, Gibran},
  journal={arXiv preprint arXiv:2401.09596},
  year={2024}
}

License

MIT

About

[ECCV 2026 Workshop LIMIT] Efficient generative adversarial networks using linear additive-attention Transformers

Topics

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages