Installation

Requirements

  • Python 3.10–3.12 (Python 3.13+ is not yet supported by TensorFlow)

  • TensorFlow ≥ 2.16

  • Keras ≥ 3.0

Note

If you attempt to install GlitchGAN with Python 3.13 or later, pip will reject it immediately with a Requires-Python error.

Basic install

pip install glitchgan

Install from source

git clone https://github.com/tomdooney95/glitchgan.git
cd glitchgan
pip install -e .

Full evaluation stack (conda)

The evaluation notebooks additionally require GWpy, PyCBC, UMAP, and GravitySpy. A complete conda environment is provided:

conda env create -f environment.yml
conda activate cdvgan

Optional documentation dependencies

pip install glitchgan[docs]

Pretrained weights

Pretrained generator weights are hosted on Hugging Face Hub and are downloaded automatically on first use — no manual step required.

To download explicitly:

from glitchgan import GlitchGAN

gan = GlitchGAN.from_pretrained()   # downloads and caches weights