[ICLR 2026] Taming large-scale few-step training with self-adversarial flows! 👏🏻
See the codeZhenglin Cheng* · Peng Sun* · Jianguo Li · Tao Lin
Join the WeChat Group, feel free to reach out anytime if you have any questions!👇
👇 WeChat Group QR Code/微信群二维码 👇
| Technical Discussion Group/技术讨论群 | Model Users Discussion Group/AIGC模型使用讨论群 |
|---|---|
![]() | ![]() |
src directory 👏🏻.
2-NFE visualization of TwinFlow-Z-Image-Turbo-exp
2-NFE visualization of Z-Image-Turbo
2-NFE visualization of TwinFlow-Qwen-Image
Case 1: 万里长城秋景,蜿蜒盘踞于层峦叠嶂的山脉之上,砖石城墙与烽火台在暖阳下呈现古朴的土黄色,山间枫叶如火般绚烂,游客点缀其间,远山薄雾缭绕,天空湛蓝飘着几朵白云,高角度全景构图,细节丰富,光影柔和。
Case2: 超高清壁纸, 梦幻光影, 少女在元宵灯会中回眸一笑, 提着一盏兔子花灯, 周围挂满明亮的灯笼, 暖色调灯光映照在脸上, 华丽的唐装, 繁复的头饰, 热闹的背景虚化, 焦外光斑美丽, 中景镜头。
Same prompt but different noise (left to right). Top to bottom shown are: Qwen-Image (50×2 NFE), TwinFlow-Qwen-Image (1-NFE), and Qwen-Image-Lightning-v2.0 (1-NFE).
TwinFlow-Qwen-Image generates high-quality images at 1-NFE while preserving strong diversity.
We introduce TwinFlow, a framework that realizes high-quality 1-step and few-step generation without the pipeline bloat.
Instead of relying on external discriminators or frozen teachers, TwinFlow creates an internal "twin trajectory". By extending the time interval to $t\in[−1,1]$, we utilize the negative time branch to map noise to "fake" data, creating a self-adversarial signal directly within the model.
Then, the model can rectify itself by minimizing the difference of the velocity fields between real trajectory and fake trajectory, i.e. the $\Delta_\mathrm{v}$. The rectification performs distribution matching as velocity matching, which gradually transforms the model into a 1-step/few-step generator.
TwinFlow method overview
Key Advantages:
For ComfyUI users, please see https://github.com/smthemex/ComfyUI_TwinFlow.
Install the latest diffusers:
pip install git+https://github.com/huggingface/diffusers
Run inference demo inference.py:
python inference.py
We recommend to sample for 2~4 NFEs:
# 4 NFE config
sampler_config = {
"sampling_steps": 4,
"stochast_ratio": 1.0,
"extrapol_ratio": 0.0,
"sampling_order": 1,
"time_dist_ctrl": [1.0, 1.0, 1.0],
"rfba_gap_steps": [0.001, 0.5],
}
# 2 NFE config
sampler_config = {
"sampling_steps": 2,
"stochast_ratio": 1.0,
"extrapol_ratio": 0.0,
"sampling_order": 1,
"time_dist_ctrl": [1.0, 1.0, 1.0],
"rfba_gap_steps": [0.001, 0.6],
}
@article{cheng2025twinflow,
title={TwinFlow: Realizing One-step Generation on Large Models with Self-adversarial Flows},
author={Cheng, Zhenglin and Sun, Peng and Li, Jianguo and Lin, Tao},
journal={arXiv preprint arXiv:2512.05150},
year={2025}
}
@misc{sun2025anystep,
author = {Sun, Peng and Lin, Tao},
note = {GitHub repository},
title = {Any-step Generation via N-th Order Recursive Consistent Velocity Field Estimation},
url = {https://github.com/LINs-lab/RCGM},
year = {2025}
}
@article{sun2025unified,
title = {Unified continuous generative models},
author = {Sun, Peng and Jiang, Yi and Lin, Tao},
journal = {arXiv preprint arXiv:2505.07447},
year = {2025},
url = {https://arxiv.org/abs/2505.07447},
archiveprefix = {arXiv},
eprint = {2505.07447},
primaryclass = {cs.LG}
}
TwinFlow is built upon RCGM and UCGM, with much support from InclusionAI.
Note: The LINs Lab has openings for PhD students for the Fall 2026/2027 intake. Interested candidates are encouraged to reach out.
Python
98.8%
Shell
1.2%
[ICLR 2026] Taming large-scale few-step training with self-adversarial flows! 👏🏻
See the codeZhenglin Cheng* · Peng Sun* · Jianguo Li · Tao Lin
Join the WeChat Group, feel free to reach out anytime if you have any questions!👇
👇 WeChat Group QR Code/微信群二维码 👇
| Technical Discussion Group/技术讨论群 | Model Users Discussion Group/AIGC模型使用讨论群 |
|---|---|
![]() | ![]() |
src directory 👏🏻.
2-NFE visualization of TwinFlow-Z-Image-Turbo-exp
2-NFE visualization of Z-Image-Turbo
2-NFE visualization of TwinFlow-Qwen-Image
Case 1: 万里长城秋景,蜿蜒盘踞于层峦叠嶂的山脉之上,砖石城墙与烽火台在暖阳下呈现古朴的土黄色,山间枫叶如火般绚烂,游客点缀其间,远山薄雾缭绕,天空湛蓝飘着几朵白云,高角度全景构图,细节丰富,光影柔和。
Case2: 超高清壁纸, 梦幻光影, 少女在元宵灯会中回眸一笑, 提着一盏兔子花灯, 周围挂满明亮的灯笼, 暖色调灯光映照在脸上, 华丽的唐装, 繁复的头饰, 热闹的背景虚化, 焦外光斑美丽, 中景镜头。
Same prompt but different noise (left to right). Top to bottom shown are: Qwen-Image (50×2 NFE), TwinFlow-Qwen-Image (1-NFE), and Qwen-Image-Lightning-v2.0 (1-NFE).
TwinFlow-Qwen-Image generates high-quality images at 1-NFE while preserving strong diversity.
We introduce TwinFlow, a framework that realizes high-quality 1-step and few-step generation without the pipeline bloat.
Instead of relying on external discriminators or frozen teachers, TwinFlow creates an internal "twin trajectory". By extending the time interval to $t\in[−1,1]$, we utilize the negative time branch to map noise to "fake" data, creating a self-adversarial signal directly within the model.
Then, the model can rectify itself by minimizing the difference of the velocity fields between real trajectory and fake trajectory, i.e. the $\Delta_\mathrm{v}$. The rectification performs distribution matching as velocity matching, which gradually transforms the model into a 1-step/few-step generator.
TwinFlow method overview
Key Advantages:
For ComfyUI users, please see https://github.com/smthemex/ComfyUI_TwinFlow.
Install the latest diffusers:
pip install git+https://github.com/huggingface/diffusers
Run inference demo inference.py:
python inference.py
We recommend to sample for 2~4 NFEs:
# 4 NFE config
sampler_config = {
"sampling_steps": 4,
"stochast_ratio": 1.0,
"extrapol_ratio": 0.0,
"sampling_order": 1,
"time_dist_ctrl": [1.0, 1.0, 1.0],
"rfba_gap_steps": [0.001, 0.5],
}
# 2 NFE config
sampler_config = {
"sampling_steps": 2,
"stochast_ratio": 1.0,
"extrapol_ratio": 0.0,
"sampling_order": 1,
"time_dist_ctrl": [1.0, 1.0, 1.0],
"rfba_gap_steps": [0.001, 0.6],
}
@article{cheng2025twinflow,
title={TwinFlow: Realizing One-step Generation on Large Models with Self-adversarial Flows},
author={Cheng, Zhenglin and Sun, Peng and Li, Jianguo and Lin, Tao},
journal={arXiv preprint arXiv:2512.05150},
year={2025}
}
@misc{sun2025anystep,
author = {Sun, Peng and Lin, Tao},
note = {GitHub repository},
title = {Any-step Generation via N-th Order Recursive Consistent Velocity Field Estimation},
url = {https://github.com/LINs-lab/RCGM},
year = {2025}
}
@article{sun2025unified,
title = {Unified continuous generative models},
author = {Sun, Peng and Jiang, Yi and Lin, Tao},
journal = {arXiv preprint arXiv:2505.07447},
year = {2025},
url = {https://arxiv.org/abs/2505.07447},
archiveprefix = {arXiv},
eprint = {2505.07447},
primaryclass = {cs.LG}
}
TwinFlow is built upon RCGM and UCGM, with much support from InclusionAI.
Note: The LINs Lab has openings for PhD students for the Fall 2026/2027 intake. Interested candidates are encouraged to reach out.
Python
98.8%
Shell
1.2%