A customizable generative adversarial network with reproducible configurations. Build your own content generator.

hypergan, artificial-intelligence, computer-vision, gan, generative-adversarial-network, machine-learning, machine-learning-api, online-learning, python, pytorch, sponsors, unsupervised-learning
pip install hypergan==1.0.5



HyperGAN 1.0

docs Discord Twitter

A composable GAN API and CLI. Built for developers, researchers, and artists.

HyperGAN is in open beta.

Colorizer 0.9 1

Logos generated with examples/colorizer

See more on the hypergan youtube

Table of contents


Generative Adversarial Networks consist of 2 learning systems that learn together. HyperGAN implements these learning systems in Tensorflow with deep learning.

For an introduction to GANs, see http://blog.aylien.com/introduction-generative-adversarial-networks-code-tensorflow/

HyperGAN is a community project. GANs are a very new and active field of research. Join the community discord.


  • Community project
  • Unsupervised learning
  • Transfer learning
  • Online learning
  • Dataset agnostic
  • Reproducible architectures using json configurations
  • Domain Specific Language to define custom architectures
  • GUI(pygame and tk)
  • API
  • CLI



See the full changelog here: Changelog.md

Quick start


Recommended: GTX 1080+


  1. Install HyperGAN For users: pip3 install hypergan

For developers: Download this repo and run python3 setup.py develop

  1. Test it out
  • hypergan train preset:celeba -s 128x128x3
  1. Join the community

Optional virtualenv:

If you use virtualenv:

  virtualenv --system-site-packages -p python3 hypergan
  source hypergan/bin/activate

Create a new model

  hypergan new mymodel

This will create a mymodel.json based off the default configuration. You can change configuration templates with the -c flag.

List configuration templates

  hypergan new mymodel -l

See all configuration templates with --list-templates or -l.


  # Train a 32x32 gan with batch size 32 on a folder of folders of pngs, resizing images as necessary
  hypergan train folder/ -s 32x32x3 -f png -c mymodel --resize

Running on CPU

Don't train on CPU! It's too slow.

The pip package hypergan

 hypergan -h


  # Train a 32x32 gan with batch size 32 on a folder of pngs
  hypergan train [folder] -s 32x32x3 -f png -b 32 --config [name]


  hypergan sample [folder] -s 32x32x3 -f png -b 32 --config [name] --sampler batch_walk --sample_every 5 --save_samples

By default hypergan will not save samples to disk. To change this, use --save_samples.

One way a network learns:


To create videos:

  ffmpeg -i samples/%06d.png video.mp4


To see a detailed list, run

  hypergan -h


See the example documentation https://github.com/hypergan/HyperGAN/tree/master/examples


To build a new network you need a dataset. Your data should be structured like:


Creating a Dataset

Datasets in HyperGAN are meant to be simple to create. Just use a folder of images.

Cleaning up data

HyperGAN is built to be resilient to all types of unclean data. If your images are too large you have the choice of --crop, --random_crop, or --resize

--crop first resizes to include as much as the image as possible(center cropped).


1.0 models are still training

Submit your showcase with a pull request!

For more, see the #showcase room in Discord


We are now accepting financial sponsors. Sponsor to (optionally) be listed here.



Contributions are welcome and appreciated! We have many open issues in the Issues tab. Join the discord.

See how to contribute.


HyperGAN uses semantic versioning. http://semver.org/

TLDR: x.y.z

  • x is incremented on stable public releases.
  • y is incremented on API breaking changes. This includes configuration file changes and graph construction changes.
  • z is incremented on non-API breaking changes. z changes will be able to reload a saved graph.


  HyperGAN Community
  HyperGAN, (2016-2020+), 
  GitHub repository, 

HyperGAN comes with no warranty or support.