Dogyun Park, Sojin Lee, Sihyeon Kim, Taehoon Lee, Youngjoon Hong†, Hyunwoo J. Kim†.
NeurIPS 2024
This repository is an official implementation of "Constant Acceleration Flow" accepted at NeurIPS 2024.
Constant Acceleration Flow (CAF) introduces a novel ODE framework that models the transformation between two distributions using constant acceleration. This approach enables high-quality image generation in a single step. Notably, CAF also achieves high-accuracy single-step inversion, demonstrating its capability to learn precise forward and reverse flows.
- Release training code.
- Release inference (sampling and inversion) code.
- Release the pre-trained model.
FID=1.69
N=1
To install requirements, run:
git clone https://github.com/mlvlab/CAF.git
cd CAF
conda create -n caf python==3.9
conda activate caf
conda install pytorch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 pytorch-cuda=11.8 -c pytorch -c nvidia
pip install -e .
(RECOMMENDED, linux) Install PyTorch 2.2.0 with CUDA 11.8 for xformers, recommended for memory-efficient computation.
We have utilized pre-trained EDM models to generate deterministic couplings for training our models. To construct deterministic couplings for CIFAR-10 and ImageNet, we selected
Data
|-- cifar10_npy
|-- z0
|-- data1.npy
|-- data2.npy
|-- ...
|-- z1
|-- data1.npy
|-- data2.npy
|-- ...
|-- class
|-- data1.npy
|-- data2.npy
|-- ...
It is important to ensure that the z0, z1, and class files correspond to each other by sharing the same filenames. Each triplet (data1.npy in z0, z1, and class) should be aligned to represent a single data pair.
This repo is built upon Consistency Models.