Add comprehensive model card for PaCo-RL
#1
by
nielsr
HF Staff
- opened
README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
pipeline_tag: image-to-image
|
| 4 |
+
library_name: diffusers
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# PaCo-RL: Advancing Reinforcement Learning for Consistent Image Generation with Pairwise Reward Modeling
|
| 8 |
+
|
| 9 |
+
This repository presents **PaCo-RL**, a comprehensive framework for consistent image generation, as described in the paper [PaCo-RL: Advancing Reinforcement Learning for Consistent Image Generation with Pairwise Reward Modeling](https://huggingface.co/papers/2512.04784).
|
| 10 |
+
|
| 11 |
+
Project Page: [https://x-gengroup.github.io/HomePage_PaCo-RL/](https://x-gengroup.github.io/HomePage_PaCo-RL/)
|
| 12 |
+
Code Repository: [https://github.com/X-GenGroup/PaCo-RL](https://github.com/X-GenGroup/PaCo-RL)
|
| 13 |
+
|
| 14 |
+
<div align="center">
|
| 15 |
+
<a href='https://arxiv.org/abs/2512.04784'><img src='https://img.shields.io/badge/ArXiv-red?logo=arxiv'></a>
|
| 16 |
+
<a href='https://x-gengroup.github.io/HomePage_PaCo-RL/'><img src='https://img.shields.io/badge/ProjectPage-purple?logo=github'></a>
|
| 17 |
+
<a href="https://github.com/X-GenGroup/PaCo-RL"><img src="https://img.shields.io/badge/Code-9E95B7?logo=github"></a>
|
| 18 |
+
<a href='https://huggingface.co/collections/X-GenGroup/paco-rl'><img src='https://img.shields.io/badge/Data & Model-green?logo=huggingface'></a>
|
| 19 |
+
</div>
|
| 20 |
+
|
| 21 |
+
## π Overview
|
| 22 |
+
|
| 23 |
+
**PaCo-RL** is a comprehensive framework for consistent image generation through reinforcement learning, addressing challenges in preserving identities, styles, and logical coherence across multiple images for storytelling and character design applications.
|
| 24 |
+
|
| 25 |
+
### Key Components
|
| 26 |
+
|
| 27 |
+
- **PaCo-Reward**: A pairwise consistency evaluator with task-aware instruction and CoT reasoning.
|
| 28 |
+
- **PaCo-GRPO**: Efficient RL optimization with resolution-decoupled training and log-tamed multi-reward aggregation
|
| 29 |
+
|
| 30 |
+
## π Quick Start
|
| 31 |
+
|
| 32 |
+
### Installation
|
| 33 |
+
```bash
|
| 34 |
+
git clone https://github.com/X-GenGroup/PaCo-RL.git
|
| 35 |
+
cd PaCo-RL
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
### Train Reward Model
|
| 39 |
+
```bash
|
| 40 |
+
cd PaCo-Reward
|
| 41 |
+
conda create -n paco-reward python=3.12 -y
|
| 42 |
+
conda activate paco-reward
|
| 43 |
+
cd LLaMA-Factory && pip install -e ".[torch,metrics]" --no-build-isolation
|
| 44 |
+
cd .. && bash train/paco_reward.sh
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
See π [PaCo-Reward Documentation](PaCo-Reward/README.md) for detailed guide.
|
| 48 |
+
|
| 49 |
+
### Run RL Training
|
| 50 |
+
```bash
|
| 51 |
+
cd PaCo-GRPO
|
| 52 |
+
conda create -n paco-grpo python=3.12 -y
|
| 53 |
+
conda activate paco-grpo
|
| 54 |
+
pip install -e .
|
| 55 |
+
|
| 56 |
+
# Setup vLLM reward server
|
| 57 |
+
conda create -n vllm python=3.12 -y
|
| 58 |
+
conda activate vllm && pip install vllm
|
| 59 |
+
export CUDA_VISIBLE_DEVICES=0
|
| 60 |
+
export VLLM_MODEL_PATHS='X-GenGroup/PaCo-Reward-7B'
|
| 61 |
+
export VLLM_MODEL_NAMES='Paco-Reward-7B'
|
| 62 |
+
bash vllm_server/launch.sh
|
| 63 |
+
|
| 64 |
+
# Start training
|
| 65 |
+
export CUDA_VISIBLE_DEVICES=1,2,3,4,5,6,7
|
| 66 |
+
conda activate paco-grpo
|
| 67 |
+
bash scripts/single_node/train_flux.sh t2is
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
See π [PaCo-GRPO Documentation](PaCo-GRPO/README.md) for detailed guide.
|
| 71 |
+
|
| 72 |
+
## π Repository Structure
|
| 73 |
+
```
|
| 74 |
+
PaCo-RL/
|
| 75 |
+
βββ PaCo-GRPO/ # RL training framework
|
| 76 |
+
β βββ config/ # RL configurations
|
| 77 |
+
β βββ scripts/ # Training scripts
|
| 78 |
+
β βββ README.md
|
| 79 |
+
βββ PaCo-Reward/ # Reward model training
|
| 80 |
+
β βββ LLaMA-Factory/ # Training framework
|
| 81 |
+
β βββ config/ # Training configurations
|
| 82 |
+
β βββ README.md
|
| 83 |
+
βββ README.md
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
## π Model Zoo
|
| 87 |
+
|
| 88 |
+
| Model | Type | HuggingFace |
|
| 89 |
+
|-------|------|-------------|
|
| 90 |
+
| **PaCo-Reward-7B** | Reward Model | [π€ Link](https://huggingface.co/X-GenGroup/PaCo-Reward-7B) |
|
| 91 |
+
| **PaCo-Reward-7B-Lora** | Reward Model (LoRA) | [π€ Link](https://huggingface.co/X-GenGroup/PaCo-Reward-7B-Lora) |
|
| 92 |
+
| **PaCo-FLUX.1-dev** | T2I Model (LoRA) | [π€ Link](https://huggingface.co/X-GenGroup/PaCo-FLUX.1-dev-Lora) |
|
| 93 |
+
| **PaCo-FLUX.1-Kontext-dev** | Image Editing Model (LoRA) | [π€ Link](https://huggingface.co/X-GenGroup/PaCo-FLUX.1-Kontext-Lora) |
|
| 94 |
+
| **PaCo-QwenImage-Edit** | Image Editing Model (LoRA) | [π€ Link](https://huggingface.co/X-GenGroup/PaCo-Qwen-Image-Edit-Lora) |
|
| 95 |
+
|
| 96 |
+
## π€ Acknowledgement
|
| 97 |
+
|
| 98 |
+
Our work is built upon [Flow-GRPO](https://github.com/yifan123/flow_grpo), [LLaMA-Factory](https://github.com/hiyouga/LLaMA-Factory), [vLLM](https://github.com/vllm-project/vllm), and [Qwen2.5-VL](https://github.com/QwenLM/Qwen3-VL). We sincerely thank the authors for their valuable contributions to the community.
|
| 99 |
+
|
| 100 |
+
## β Citation
|
| 101 |
+
```bibtex
|
| 102 |
+
@misc{ping2025pacorladvancingreinforcementlearning,
|
| 103 |
+
title={PaCo-RL: Advancing Reinforcement Learning for Consistent Image Generation with Pairwise Reward Modeling},
|
| 104 |
+
author={Bowen Ping and Chengyou Jia and Minnan Luo and Changliang Xia and Xin Shen and Zhuohang Dang and Hangwei Qian},
|
| 105 |
+
year={2025},
|
| 106 |
+
eprint={2512.04784},
|
| 107 |
+
archivePrefix={arXiv},
|
| 108 |
+
primaryClass={cs.CV},
|
| 109 |
+
url={https://arxiv.org/abs/2512.04784},
|
| 110 |
+
}
|
| 111 |
+
```
|
| 112 |
+
|
| 113 |
+
<div align="center">
|
| 114 |
+
<sub>β Star us on GitHub if you find PaCo-RL helpful!</sub>
|
| 115 |
+
</div>
|