|
1 | | -# APEX |
| 1 | +<h1 align="center"><sub><sup>Self-Adversarial One Step Generation via Condition Shifting</sup></sub></h1> |
| 2 | + |
| 3 | +<p align="center"> |
| 4 | + <a href="https://zhenglin-cheng.com/" target="_blank">Deyuan Liu</a><sup>*</sup>   <b>·</b>   |
| 5 | + <a href="https://scholar.google.com/citations?user=-8XvRRIAAAAJ" target="_blank">Peng Sun</a><sup>*</sup>   <b>·</b>   |
| 6 | + <a target="_blank">Yansen Han</a>   <b>·</b>   |
| 7 | + <a href="https://zhenglin-cheng.com/" target="_blank">Zhenglin Cheng</a>   <b>·</b>   |
| 8 | + <a target="_blank">Chuyan Chen</a>   <b>·</b>   |
| 9 | + <a href="https://lins-lab.github.io/" target="_blank">Tao Lin</a> |
| 10 | +</p> |
| 11 | + |
| 12 | +<div align="center"> |
| 13 | + |
| 14 | +[](https://github.com/LINs-lab/APEX)  |
| 15 | +[](https://github.com/inclusionAI/TwinFlow)  |
| 16 | +<a href="https://arxiv.org/abs/2604.xxxxx" target="_blank"><img src="https://img.shields.io/badge/Paper-b5212f.svg?logo=arxiv" height="21px"></a> |
| 17 | +[](./assets/wechat.png) |
| 18 | + |
| 19 | +</div> |
| 20 | + |
| 21 | +**Join the WeChat Group, feel free to reach out anytime if you have any questions!👇** |
| 22 | + |
| 23 | +<p>👇 WeChat Group QR Code/微信群二维码 👇</p> |
| 24 | + |
| 25 | +- Technical Discussion Group 1 is full, please join Technical Discussion Group 2 |
| 26 | + |
| 27 | +| Technical Discussion Group/技术讨论群 | Model Users Discussion Group/AIGC模型使用讨论群 | |
| 28 | +|----------------------------|------------------------------------------| |
| 29 | +| <img src="./assets/wechat.png" style="width: 70%;" /> | <img src="./assets/wechat2.png" style="width: 70%;" /> | |
| 30 | + |
| 31 | +</details> |
| 32 | + |
| 33 | +## 🧭 Table of Contents |
| 34 | + |
| 35 | +- [🔥 Codebase Usage 🔥](src/README.md) |
| 36 | + |
| 37 | +## 📰 News |
| 38 | + |
| 39 | +- We release experimental version of faster Z-Image-Turbo! |
| 40 | + |
| 41 | +## 💪 Open-source Plans |
| 42 | + |
| 43 | +- [x] Release faster experimental version of Z-Image-Turbo. |
| 44 | +- [ ] Release APEX-v0 version of Z-Image. |
| 45 | +- [ ] Release APEX-v0 version of Qwen-Image-2512. |
| 46 | +- [ ] Release large-scale training code. |
| 47 | + |
| 48 | +## APEX |
| 49 | + |
| 50 | +### APEX-Qwen-Image-2512 Visualization |
| 51 | + |
| 52 | +<div align="center"> |
| 53 | + <img src="assets/apex.jpg" width="1000" /> |
| 54 | + <p style="margin-top: 8px; font-size: 14px; color: #666; font-weight: bold;"> |
| 55 | + 2-NFE visualization of Qwen-Image-2512 |
| 56 | + </p> |
| 57 | +</div> |
| 58 | + |
| 59 | + |
| 60 | +### Inference Demo |
| 61 | + |
| 62 | +**For ComfyUI users, please see https://github.com/smthemex/ComfyUI_TwinFlow.** |
| 63 | + |
| 64 | +Install the latest diffusers: |
| 65 | + |
| 66 | +```bash |
| 67 | +pip install git+https://github.com/huggingface/diffusers |
| 68 | +``` |
| 69 | + |
| 70 | +Run inference demo `inference.py`: |
| 71 | + |
| 72 | +```python |
| 73 | +python inference.py |
| 74 | +``` |
| 75 | + |
| 76 | +We recommend to sample for 2~4 NFEs: |
| 77 | + |
| 78 | +```python |
| 79 | +# 4 NFE config |
| 80 | +sampler_config = { |
| 81 | + "sampling_steps": 4, |
| 82 | + "stochast_ratio": 1.0, |
| 83 | + "extrapol_ratio": 0.0, |
| 84 | + "sampling_order": 1, |
| 85 | + "time_dist_ctrl": [1.0, 1.0, 1.0], |
| 86 | + "rfba_gap_steps": [0.001, 0.5], |
| 87 | +} |
| 88 | + |
| 89 | +# 2 NFE config |
| 90 | +sampler_config = { |
| 91 | + "sampling_steps": 2, |
| 92 | + "stochast_ratio": 1.0, |
| 93 | + "extrapol_ratio": 0.0, |
| 94 | + "sampling_order": 1, |
| 95 | + "time_dist_ctrl": [1.0, 1.0, 1.0], |
| 96 | + "rfba_gap_steps": [0.001, 0.6], |
| 97 | +} |
| 98 | +``` |
| 99 | + |
| 100 | +## 📖 Citation |
| 101 | + |
| 102 | +```bibtex |
| 103 | +@article{cheng2025twinflow, |
| 104 | + title={TwinFlow: Realizing One-step Generation on Large Models with Self-adversarial Flows}, |
| 105 | + author={Cheng, Zhenglin and Sun, Peng and Li, Jianguo and Lin, Tao}, |
| 106 | + journal={arXiv preprint arXiv:2512.05150}, |
| 107 | + year={2025} |
| 108 | +} |
| 109 | +
|
| 110 | +@misc{sun2025anystep, |
| 111 | + author = {Sun, Peng and Lin, Tao}, |
| 112 | + note = {GitHub repository}, |
| 113 | + title = {Any-step Generation via N-th Order Recursive Consistent Velocity Field Estimation}, |
| 114 | + url = {https://github.com/LINs-lab/RCGM}, |
| 115 | + year = {2025} |
| 116 | +} |
| 117 | +
|
| 118 | +@article{sun2025unified, |
| 119 | + title = {Unified continuous generative models}, |
| 120 | + author = {Sun, Peng and Jiang, Yi and Lin, Tao}, |
| 121 | + journal = {arXiv preprint arXiv:2505.07447}, |
| 122 | + year = {2025}, |
| 123 | + url = {https://arxiv.org/abs/2505.07447}, |
| 124 | + archiveprefix = {arXiv}, |
| 125 | + eprint = {2505.07447}, |
| 126 | + primaryclass = {cs.LG} |
| 127 | +} |
| 128 | +``` |
| 129 | + |
| 130 | +## 🤗 Acknowledgement |
| 131 | + |
| 132 | +APEX is built upon [TwinFlow](https://github.com/inclusionAI/TwinFlow), [RCGM](https://github.com/LINs-lab/RCGM) and [UCGM](https://github.com/LINs-lab/UCGM), with much support from [InclusionAI](https://github.com/inclusionAI). |
| 133 | + |
| 134 | +Note: The [LINs Lab](https://lins-lab.github.io/) has openings for PhD students for the Fall 2026/2027 intake. Interested candidates are encouraged to reach out. |
0 commit comments