Add text-to-image pipeline tag and improve model card title (#1)
Browse files- Add text-to-image pipeline tag and improve model card title (690969923843c4745535f1a16a15bf0820dcc876)
Co-authored-by: Niels Rogge <[email protected]>
README.md
CHANGED
|
@@ -1,30 +1,28 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
datasets:
|
| 5 |
- Franklin0/ReasonGen-R1-RL-Geneval-12k
|
| 6 |
- Franklin0/ReasonGen-R1-RL-DPG-5k
|
| 7 |
- Franklin0/ReasonGen-R1-RL-T2I-11k
|
| 8 |
-
|
| 9 |
-
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
# Model Card for
|
| 13 |
|
| 14 |
-
|
| 15 |
Official checkpoint for the paper "[ReasonGen-R1: Cot for Autoregressive Image generation models through SFT and RL](https://huggingface.co/papers/2505.24875)".
|
| 16 |
|
| 17 |
Website: https://aka.ms/reasongen
|
| 18 |
|
| 19 |
Code: https://github.com/Franklin-Zhang0/Image-RL
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
<!-- markdownlint-disable first-line-h1 -->
|
| 24 |
<!-- markdownlint-disable html -->
|
| 25 |
<!-- markdownlint-disable no-duplicate-header -->
|
| 26 |
|
| 27 |
-
|
| 28 |
<h1> 🚀 ReasonGen-R1: <br> Cot for Autoregressive Image generation models through SFT and RL</h1>
|
| 29 |
|
| 30 |
</div>
|
|
@@ -41,9 +39,6 @@ Code: https://github.com/Franklin-Zhang0/Image-RL
|
|
| 41 |
|
| 42 |
</div>
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
<p align="center">
|
| 48 |
<a href="#2-model-download"><b>📥 Model Download</b></a> |
|
| 49 |
<a href="#3-quick-start"><b>⚡ Quick Start</b></a> |
|
|
@@ -73,6 +68,9 @@ Evaluations on Geneval, DPG, and the T2I benchmark demonstrate that ReasonGen-R1
|
|
| 73 |
| ReasonGen-R1 | [🤗 Hugging Face](https://huggingface.co/Franklin0/ReasonGen-R1) |
|
| 74 |
| ReasonGen-R1-SFT-Only | [🤗 Hugging Face](https://huggingface.co/Franklin0/ReasonGen-R1-SFT) |
|
| 75 |
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
|
| 78 |
## 3. Quick Start
|
|
@@ -90,7 +88,7 @@ conda activate image_rl
|
|
| 90 |
pip3 install torch==2.6.0 torchvision --index-url https://download.pytorch.org/whl/cu124
|
| 91 |
pip3 install flash-attn --no-build-isolation
|
| 92 |
git clone https://github.com/Franklin-Zhang0/ReasonGen-R1.git
|
| 93 |
-
cd
|
| 94 |
pip install -r requirements.txt
|
| 95 |
pip install -e .
|
| 96 |
pip install -e ./Janus
|
|
@@ -134,7 +132,7 @@ cd ~
|
|
| 134 |
cd project
|
| 135 |
git clone https://github.com/TencentQQGYLab/ELLA.git
|
| 136 |
cd ELLA
|
| 137 |
-
cp ~/project/ReasonGen-R1/requirements-for-dpg_bench.txt .
|
| 138 |
conda deactivate
|
| 139 |
conda create -n dpg_test python=3.9 -y
|
| 140 |
conda activate dpg_test
|
|
@@ -152,19 +150,19 @@ bash -i benchmark/dpg_eval.sh
|
|
| 152 |
### Inference
|
| 153 |
To inference with the ReasonGen-R1 model, you can use the following command:
|
| 154 |
```shell
|
| 155 |
-
python
|
| 156 |
```
|
| 157 |
|
| 158 |
### SFT Training
|
| 159 |
To train the SFT model from Janus-Pro-7B model on the ReasonGen-R1-SFT-200k dataset, you can use the following command:
|
| 160 |
```shell
|
| 161 |
-
bash
|
| 162 |
```
|
| 163 |
|
| 164 |
### RL Training
|
| 165 |
To train the RL model from the ReasonGen-R1-SFT model, you can use the following command:
|
| 166 |
```shell
|
| 167 |
-
bash
|
| 168 |
```
|
| 169 |
|
| 170 |
|
|
@@ -183,4 +181,4 @@ We would like to thank <a href="https://github.com/volcengine/verl">Verl</a>, up
|
|
| 183 |
primaryClass={cs.CV},
|
| 184 |
url={https://arxiv.org/abs/2505.24875},
|
| 185 |
}
|
| 186 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model:
|
| 3 |
+
- deepseek-ai/Janus-Pro-7B
|
| 4 |
datasets:
|
| 5 |
- Franklin0/ReasonGen-R1-RL-Geneval-12k
|
| 6 |
- Franklin0/ReasonGen-R1-RL-DPG-5k
|
| 7 |
- Franklin0/ReasonGen-R1-RL-T2I-11k
|
| 8 |
+
library_name: transformers
|
| 9 |
+
license: apache-2.0
|
| 10 |
+
pipeline_tag: text-to-image
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# Model Card for ReasonGen-R1: Chain-of-Thought Reasoning for Autoregressive Image Generation
|
| 14 |
|
| 15 |
+
ReasonGen-R1 is an autoregressive image generation model incorporating chain-of-thought reasoning.
|
| 16 |
Official checkpoint for the paper "[ReasonGen-R1: Cot for Autoregressive Image generation models through SFT and RL](https://huggingface.co/papers/2505.24875)".
|
| 17 |
|
| 18 |
Website: https://aka.ms/reasongen
|
| 19 |
|
| 20 |
Code: https://github.com/Franklin-Zhang0/Image-RL
|
| 21 |
|
|
|
|
|
|
|
| 22 |
<!-- markdownlint-disable first-line-h1 -->
|
| 23 |
<!-- markdownlint-disable html -->
|
| 24 |
<!-- markdownlint-disable no-duplicate-header -->
|
| 25 |
|
|
|
|
| 26 |
<h1> 🚀 ReasonGen-R1: <br> Cot for Autoregressive Image generation models through SFT and RL</h1>
|
| 27 |
|
| 28 |
</div>
|
|
|
|
| 39 |
|
| 40 |
</div>
|
| 41 |
|
|
|
|
|
|
|
|
|
|
| 42 |
<p align="center">
|
| 43 |
<a href="#2-model-download"><b>📥 Model Download</b></a> |
|
| 44 |
<a href="#3-quick-start"><b>⚡ Quick Start</b></a> |
|
|
|
|
| 68 |
| ReasonGen-R1 | [🤗 Hugging Face](https://huggingface.co/Franklin0/ReasonGen-R1) |
|
| 69 |
| ReasonGen-R1-SFT-Only | [🤗 Hugging Face](https://huggingface.co/Franklin0/ReasonGen-R1-SFT) |
|
| 70 |
|
| 71 |
+
| Dataset | Download |
|
| 72 |
+
|-----------------------|-----------------------------------------------------------------------------|
|
| 73 |
+
| ReasonGen-R1-Datasets | [🤗 Hugging Face](https://huggingface.co/collections/Franklin0/reasongen-r1-6836ed61fc4f6db543c0d368) |
|
| 74 |
|
| 75 |
|
| 76 |
## 3. Quick Start
|
|
|
|
| 88 |
pip3 install torch==2.6.0 torchvision --index-url https://download.pytorch.org/whl/cu124
|
| 89 |
pip3 install flash-attn --no-build-isolation
|
| 90 |
git clone https://github.com/Franklin-Zhang0/ReasonGen-R1.git
|
| 91 |
+
cd ReasonGen-R1
|
| 92 |
pip install -r requirements.txt
|
| 93 |
pip install -e .
|
| 94 |
pip install -e ./Janus
|
|
|
|
| 132 |
cd project
|
| 133 |
git clone https://github.com/TencentQQGYLab/ELLA.git
|
| 134 |
cd ELLA
|
| 135 |
+
cp ~/project/ReasonGen-R1/benchmark/requirements-for-dpg_bench.txt .
|
| 136 |
conda deactivate
|
| 137 |
conda create -n dpg_test python=3.9 -y
|
| 138 |
conda activate dpg_test
|
|
|
|
| 150 |
### Inference
|
| 151 |
To inference with the ReasonGen-R1 model, you can use the following command:
|
| 152 |
```shell
|
| 153 |
+
python ReasonGen-R1/Janus/cot_generate_inference.py
|
| 154 |
```
|
| 155 |
|
| 156 |
### SFT Training
|
| 157 |
To train the SFT model from Janus-Pro-7B model on the ReasonGen-R1-SFT-200k dataset, you can use the following command:
|
| 158 |
```shell
|
| 159 |
+
bash ReasonGen-R1/examples/janus_sft.sh
|
| 160 |
```
|
| 161 |
|
| 162 |
### RL Training
|
| 163 |
To train the RL model from the ReasonGen-R1-SFT model, you can use the following command:
|
| 164 |
```shell
|
| 165 |
+
bash ReasonGen-R1/Janus/janus_rl.py
|
| 166 |
```
|
| 167 |
|
| 168 |
|
|
|
|
| 181 |
primaryClass={cs.CV},
|
| 182 |
url={https://arxiv.org/abs/2505.24875},
|
| 183 |
}
|
| 184 |
+
```
|