Skip to content

Commit d4511be

Browse files
committed
v0
1 parent f6966c0 commit d4511be

71 files changed

Lines changed: 11631 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 134 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,134 @@
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&nbsp;Liu</a><sup>*</sup> &ensp; <b>&middot;</b> &ensp;
5+
<a href="https://scholar.google.com/citations?user=-8XvRRIAAAAJ" target="_blank">Peng&nbsp;Sun</a><sup>*</sup> &ensp; <b>&middot;</b> &ensp;
6+
<a target="_blank">Yansen&nbsp;Han</a> &ensp; <b>&middot;</b> &ensp;
7+
<a href="https://zhenglin-cheng.com/" target="_blank">Zhenglin&nbsp;Cheng</a> &ensp; <b>&middot;</b> &ensp;
8+
<a target="_blank">Chuyan&nbsp;Chen</a> &ensp; <b>&middot;</b> &ensp;
9+
<a href="https://lins-lab.github.io/" target="_blank">Tao&nbsp;Lin</a>
10+
</p>
11+
12+
<div align="center">
13+
14+
[![Github Repo](https://img.shields.io/badge/LINs--lab%2FAPEX-black?logo=github)](https://github.com/LINs-lab/APEX)&#160;
15+
[![Github Repo](https://img.shields.io/badge/inclusionAI%2FTwinFlow-black?logo=github)](https://github.com/inclusionAI/TwinFlow)&#160;
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+
[![WeChat](https://img.shields.io/badge/WeChat-green?logo=wechat&amp&color=white)](./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.

assets/.DS_Store

6 KB
Binary file not shown.

assets/apex.jpg

5.87 MB
Loading

assets/wechat.png

236 KB
Loading

assets/wechat2.png

229 KB
Loading

assets/z_turbo_2step.jpg

3.22 MB
Loading

diffusers_patch/__init__.py

Whitespace-only changes.

diffusers_patch/qwen_image/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)