File size: 3,727 Bytes
aaced19 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | <div align="center">
# Perceptual Flow Matching for Few-Step Generative Modeling
<p>
<strong>
Chuyang Zhao<sup>1</sup> Yifei Song<sup>2</sup> Hongfa Wang<sup>3</sup> Jianlong Yuan<sup>1</sup>
Yuan Zhang<sup>1</sup> Siming Fu<sup>1</sup> Zhineng Chen<sup>2</sup> Huilin Deng<sup>4</sup> Haoyang Huang<sup>1</sup> Nan Duan<sup>1</sup>â€
</strong>
</p>
<p>
<sup>1</sup>Joy Future Academy
<sup>2</sup>Fudan University
<sup>3</sup>Tsinghua University
<sup>4</sup>USTC
</p>
<p>
<a href="https://arxiv.org/abs/2607.03524v1"><img src="https://img.shields.io/badge/arXiv-2607.03524-b31b1b.svg"></a>
<a href="https://huggingface.co/papers/2607.03524"><img src="https://img.shields.io/badge/🤗-Paper%20In%20HF-red.svg" alt="Hugging Face"></a>
<a href="https://github.com/ZhaoChuyang/PFM"><img src="https://img.shields.io/badge/GitHub-Code-black?logo=github"></a>
</p>
</div>
## 📰 News
- [2026/07/23] We release the training and inference code and checkpoints of PFM on SD3.
## Introduction
We propose Perceptual Flow Matching (PFM) — a simple framework for few-step generation in flow-matching models. By supervising flow matching in a perceptual feature space instead of the conventional VAE latent space, PFM reduces sampling steps from 35–50 to 4–8 while preserving generation quality.
<p align="center">
<img src="assets/introduction.png" width="90%" alt="Perceptual Flow Matching Method Overview">
</p>
## Usage
### Environment Setup
```bash
conda create -n pfm python=3.10 -y
conda activate pfm
pip install -r requirements.txt
```
### Training
| Task | Dataset | LoRA | Perceptual Model | Backbone | GFT Scale | Script |
|------|---------|------|-----------------|----------|-----------|--------|
| T2I | COCO | ✗ | VGG+DINO | SD3-Medium | 1.0 | [train_sd3_coco_vgg+dino.sh](scripts/train_sd3_coco_vgg+dino.sh) |
| T2I | COCO | ✓ | VGG+DINO | SD3-Medium | 2.0 | [train_sd3_lora_coco_vgg+dino.sh](scripts/train_sd3_lora_coco_vgg+dino.sh) |
| T2I | COCO | ✗ | ConvNeXt+CLIP+DINO | SD3-Medium | 3.5 | [train_sd3_coco_clip+dino+convnext.sh](scripts/train_sd3_coco_clip+dino+convnext.sh) |
### Inference
```bash
cd /path/to/PFM
export PYTHONPATH=$PYTHONPATH:$(pwd)
torchrun --nproc_per_node=8 pfm/eval_sd3.py \
--checkpoint /path/to/checkpoint/step_500.pth \
--val_prompts_file evaluations/PartiPrompts.jsonl \
--sampling_methods consistency \
--num_steps 4,8 \
--output_dir outputs/sd3_pfm/eval \
--max_samples 64
```
## Acknowledgements
This project is built upon [HunyuanVideo](https://github.com/Tencent-Hunyuan/HunyuanVideo-1.5), [JoyAI-Image](https://github.com/jd-opensource/JoyAI-Image), and [FastVideo](https://github.com/hao-ai-lab/fastvideo). We thank the authors for their great work.
## Contact
For any questions, please contact [Chuyang Zhao](mailto:chuyang.zhao@outlook.com)(chuyang.zhao@outlook.com).
We are hiring interns at [JoyAI Research](https://research.joyai.com/). If you are interested, please send your resume to [zhaochuyang.3@jd.com](mailto:zhaochuyang.3@jd.com).
## Citation
```bibtex
@misc{zhao2026perceptualflowmatchingfewstep,
title={Perceptual Flow Matching for Few-Step Generative Modeling},
author={Chuyang Zhao and Yifei Song and Hongfa Wang and Jianlong Yuan and Yuan Zhang and Siming Fu and Zhineng Chen and Huilin Deng and Haoyang Huang and Nan Duan},
year={2026},
eprint={2607.03524},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2607.03524},
}
```
## License
This project is released under the [Apache-2.0](LICENSE) license. |