Practical overview
When it fits
Use the repository when you want to work directly with PyTorch training and testing code for paired or unpaired image translation, rather than a hosted image-editing interface.
Who it is for
- Researchers reproducing or adapting image-to-image translation experiments.
- Developers training image-conversion models with paired or unpaired datasets.
Documented uses
- Train a pix2pix model on paired image examples.
- Train a CycleGAN model on unpaired image collections.
- Test a trained model and inspect generated outputs in an HTML results page.
- Adapt the code using its custom model and dataset templates.
Requirements & limits
- The dataset setup determines the model path: pix2pix is the paired workflow, while CycleGAN is the unpaired workflow.
- The README reports Python 3.11 and PyTorch 2.4+ support; it also identifies an older branch for PyTorch 0.1–0.3.
- The project includes example dataset-download scripts and Conda environment instructions; Docker guidance is also referenced.
- Optional W&B dashboard logging is available through the
--use_wandbtraining flag.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Train and test a paired pix2pix model
Follow the repository's facades example to train pix2pix and produce test results.
Before you start
- Clone the repository.
- Install PyTorch and the other dependencies; the README also provides a Conda environment file.
- Use the facades dataset or another suitable paired pix2pix dataset.
Steps
Download the example dataset with the command below.
bash ./datasets/download_pix2pix_dataset.sh facadesTrain with the command below.
python train.py --dataroot ./datasets/facades --name facades_pix2pix --model pix2pix --direction BtoATest with the command below.
python test.py --dataroot ./datasets/facades --name facades_pix2pix --model pix2pix --direction BtoA
Expected outcome
The README says intermediate training results are viewable under `./checkpoints/facades_pix2pix/web/index.html`; test results are saved as an HTML page under `./results/facades_pix2pix/latest_test/index.html`.
Guide limitations
- The guide follows the documented facades example; using another dataset requires a suitable paired dataset and corresponding data-root and direction settings.
Train and test an unpaired CycleGAN model
Follow the repository's maps example to train CycleGAN and generate test results.
Before you start
- Clone the repository.
- Install PyTorch and the other dependencies; the README also provides a Conda environment file.
- Use the maps dataset or another suitable unpaired CycleGAN dataset.
Steps
Download the example dataset with the command below.
bash ./datasets/download_cyclegan_dataset.sh mapsTrain with the command below.
python train.py --dataroot ./datasets/maps --name maps_cyclegan --model cycle_ganTest with the command below.
python test.py --dataroot ./datasets/maps --name maps_cyclegan --model cycle_gan
Expected outcome
The README says intermediate training results are viewable under `./checkpoints/maps_cyclegan/web/index.html`; test results are saved under `./results/maps_cyclegan/latest_test/index.html`.
Guide limitations
- The guide follows the documented maps example; other datasets require suitable unpaired data and corresponding data-root settings.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- junyanz/pytorch-CycleGAN-and-pix2pix · Official homepage title · retained in its source language
Related options
img2img-turbo — The repository points to this separate project for pix2pix-turbo and CycleGAN-Turbo one-step translation methods.
Contrastive Unpaired Translation (CUT) — The repository points to CUT as another unpaired image-translation approach, described there as enabling faster, memory-efficient training.

