# Train Lightweight GAN on your custom data This folder contains a script to train ['Lightweight' GAN](https://openreview.net/forum?id=1Fqg133qRaI) for unconditional image generation, leveraging the [Hugging Face](https://huggingface.co/) ecosystem for processing your data and pushing the model to the Hub. The script leverages 🤗 Datasets for loading and processing data, and 🤗 Accelerate for instantly running on CPU, single, multi-GPUs or TPU, also supporting mixed precision.
Pizza's that don't exist. Courtesy of Phil Wang. ## Launching the script To train the model with the default parameters on [huggan/CelebA-faces](https://huggingface.co/datasets/huggan/CelebA-faces), first run: ```bash accelerate config ``` and answer the questions asked about your environment. Next, launch the script as follows: ```bash accelerate launch cli.py ``` This will instantly run on multi-GPUs (if you asked for that). To train on another dataset available on the hub, simply do (for instance): ```bash accelerate launch cli.py --dataset_name huggan/pokemon ``` In case you'd like to tweak the script to your liking, first fork the "community-events" [repo](https://github.com/huggingface/community-events) (see the button on the top right), then clone it locally: ```bash git clone https://github.com/
# Citation This repo is entirely based on lucidrains' [Pytorch implementation](https://github.com/lucidrains/lightweight-gan), but with added HuggingFace goodies.