Here is a nano demonstration, which is the initial proof-of-concept code we developed at the beginning of this project. It does not include the significant contributions mentioned in the paper (i.e., this is an informal implementation).
More details will be released after the code is cleaned.
Fig. 1: The trajectory demonstration of RAC: Make the reconstruction task a condition generation task; Make the decoder the encoder; Make the single-step decoding and encoding a multi-step decoding and encoding.
conda create -n RAC python=3.11 -y
conda activate RAC
pip install numpy matplotlib tqdm torch torchvision diffusers
python train_nano_rac.py
@misc{fang2026racrectifiedflowauto,
title={RAC: Rectified Flow Auto Coder},
author={Sen Fang and Yalin Feng and Yanxin Zhang and Dimitris N. Metaxas},
year={2026},
eprint={2603.05925},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2603.05925},
}
