The GAN codebase that launched a thousand papers, still maintained
Reference PyTorch implementation of CycleGAN and pix2pix, recently updated for PyTorch 2.4 and Python 3.11.

What it does
This repo bundles two landmark image-to-image translation models in one PyTorch codebase. pix2pix learns paired mappings (think sketches to photos, edges to cats). CycleGAN handles the harder case: unpaired translation, like horses to zebras, by enforcing cycle consistency so the network can’t cheat.
The interesting bit
The authors themselves now point to newer successors—img2img-turbo for speed, CUT for efficiency—yet they keep maintaining this repo as a stable reference. That honesty is rare. The 2025 update adds DDP multi-GPU support via torchrun, which matters more than it sounds for actually reproducing paper results at scale.
Key highlights
- Supports both paired (pix2pix) and unpaired (CycleGAN) training in one framework
- Updated in 2025 for Python 3.11, PyTorch 2.4+, and single-machine DDP
- Pre-trained models available via shell scripts; results render to browsable HTML
- Includes Colab notebooks, Docker setup, and course materials from U of T
- Extensive docs: tips, FAQ, code overview, plus templates for custom models/datasets
Caveats
- The authors explicitly note newer methods outperform this code; check img2img-turbo or CUT if you want state-of-the-art
- Original paper reproduction requires the older Lua/Torch versions, not this PyTorch port
Verdict
Grab this if you need a well-documented, battle-tested baseline for image translation research or teaching. Skip it if you just want the fastest inference or best quality—follow the authors’ own pointers to their newer work instead.