# lucidrains/lightweight-gan

Implementation of 'lightweight' GAN, proposed in ICLR 2021, in Pytorch. High resolution image generations that can be trained within a day or two

Repository: https://github.com/lucidrains/lightweight-gan
Canonical: https://ross.abutalabs.com/products/lightweight-gan
Language: Python
License: MIT
License Family: permissive
Topics: artificial-intelligence, deep-learning, generative-adversarial-network
Last push: 2025-01-12T02:11:34+00:00

## Health v2 (maintenance only)
Score: 34/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 1, release rhythm 40, longevity 100
- inputs: {"age_days": 2121, "days_push": 599, "days_rel": 599, "gap_med": 0, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1682, forks 219 (observed 2026-08-28T04:05:21.756359+00:00)

## What it is
A PyTorch implementation of the 'lightweight' GAN from ICLR 2021, featuring skip-layer excitation in the generator and autoencoding self-supervised learning in the discriminator. It enables high-resolution image generation (up to 1024px) trainable on a single GPU within hours to a couple of days.

## Use cases
- train a GAN to generate high-resolution images from a small dataset
- generate 512x512 images on a single GPU in hours
- generate images from a few hundred training photos
- experiment with data augmentation for low-data GAN training
- preview augmentation effects on images before training

## When to choose
- you need to train an image generator quickly on limited hardware
- you have a small image dataset (sub-hundred images) and want high-resolution output
- you want a simple one-command GAN training pipeline in PyTorch

## When to avoid
- you need state-of-the-art diffusion-model quality rather than GANs
- you need text-to-image or conditional generation
- you require large-scale distributed training infrastructure

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning, image-processing, cli
- domain: artificial-intelligence, deep-learning, image-processing
- platform: python, cli
- tags: gan, generative-adversarial-network, pytorch, image-generation, iclr-2021, gpu

## Member repositories
- lucidrains/lightweight-gan (main) score 34

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:21.756359+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:41:22.800745+00:00, confidence not recorded.
  - readme: https://github.com/lucidrains/lightweight-gan (fetched 2026-08-28T04:05:21.756359+00:00, sha ff0614baccf1)
  - registry_pypi: https://pypi.org/pypi/lightweight-gan/json (fetched 2026-08-29T11:14:18.730665+00:00, sha 786fec4366f3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
