1KAIST 2Korea University 3LG AI Research
Stochastic Optimal Control for Diffusion Bridges in Function Spaces (DBFS) extends previous bridge matching algorithms to learn diffusion models between two infinite-dimensional distributions in a resolution-free manner.
pi_0 ⇆ pi_T | Results (left: pi_0 → pi_T, right: pi_0 ← pi_T) |
---|---|
EMNIST ⇆ MNIST (32x32, observed) | |
EMNIST ⇆ MNIST (64x64, unseen) | |
EMNIST ⇆ MNIST (128x128, unseen) | |
AFHQ-64 Wild ⇆ Cat (64x64, observed) | |
AFHQ-64 Wild ⇆ Cat (128x128, unseen) |
This code is developed with Python3 and Pytorch. To set up an environment with the required packages,
- Create a virtual enviornment, for example:
conda create -n dbfs pip
conda activate dbfs
- Install Pytorch according to the official instructions.
- Install the requirements:
pip install -r requirements.txt
Download the AFHQ dataset from stargan-v2, and save them in the dbfs/data
directory.
You can also download the dataset with the following commands:
bash download.sh afhq-dataset
You can download the model checkpoints from Google Drive and save them in the dbfs/checkpoint
directory.
See dbfs/dbfs_{DATASET}_sample.ipynb
for sampling from the trained models.
We train DBFS with single or multi A6000 GPUs for each dataset.
You can also adjust the --batch_dim
and --nproc-per-node
options according to your local resources.
CUDA_VISIBLE_DEVICES=0 python dbfs_mnist.py
CUDA_VISIBLE_DEVICES=0,1 torchrun --nproc-per-node 2 dbfs_mnist.py
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 torchrun --nproc-per-node 8 dbfs_afhq.py
The running histories are available on Weights & Biases for reproducibility.
If you found our work useful for your research, please consider citing our work.
@inproceedings{
park2024stochastic,
title={Stochastic Optimal Control for Diffusion Bridges in Function Spaces},
author={Byoungwoo Park and Jungwon Choi and Sungbin Lim and Juho Lee},
booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
year={2024},
url={https://openreview.net/forum?id=WyQW4G57Zd}
}
Our code builds upon an outstanding open source projects and papers: