HyperAI

Flow-GRPO Flow Matching Text Graph Model Demo

1. Tutorial Introduction

Build

Flow-GRPO is a flow matching model launched by the Multimedia Laboratory of the Chinese University of Hong Kong, Tsinghua University and Kuaishou Keling team on May 13, 2025. The model pioneered the integration of online reinforcement learning framework and flow matching theory, and achieved breakthrough progress in the GenEval 2025 benchmark test: the combined generation accuracy of the SD 3.5 Medium model jumped from the benchmark value of 63% to 95%, and the generation quality evaluation index surpassed GPT-4o for the first time. The related paper results are "Flow-GRPO: Training Flow Matching Models via Online RL".

This tutorial uses a single RTX 4090 card as the resource, and the image generation prompts only support English.

2. Project Examples

3. Operation steps

1. After starting the container, click the API address to enter the Web interface

If "Bad Gateway" is displayed, it means the model is initializing. Since the model is large, please wait about 1-2 minutes and refresh the page.

2. After entering the webpage, you can start a conversation with the model

How to use

Parameter Description:

  • LoRA Model:
    1. None:  The basic model is called natively, and no optimization strategy is introduced.
    2. GenEval:  A six-dimensional evaluation system is constructed to support the generation and verification of complex scenarios.
    3. Text Rendering:  Accurate text visualization enables precise mapping of graphic and text content.
    4. Human Preference Alignment:  Quantitative alignment of aesthetic preferences and integrated PickScore evaluation framework
  • Starting Seed:  The random number seed is used to control the randomness of the generation process. The same Seed value can generate the same results (provided that other parameters are the same), which is very important in reproducing the results.
  • Width:  Used to control the width of the generated image.
  • Height:  Used to control the height of the generated image.
  • Guidance scale:  It is used to control the influence of conditional input (such as text or image) on the generated results in the generative model. A higher guidance value will make the generated results closer to the input conditions, while a lower value will retain more randomness.
  • Number of inference steps:  Indicates the number of iterations of the model or the number of steps in the inference process, representing the number of optimization steps the model uses to produce the result. A higher number of steps generally produces more refined results, but may increase the computation time.

4. Discussion

🖌️ If you see a high-quality project, please leave a message in the background to recommend it! In addition, we have also established a tutorial exchange group. Welcome friends to scan the QR code and remark [SD Tutorial] to join the group to discuss various technical issues and share application effects↓

Citation Information

Thanks to Github user xxxjjjyyy1  Deployment of this tutorial. The reference information of this project is as follows:

@misc{liu2025flowgrpo,
      title={Flow-GRPO: Training Flow Matching Models via Online RL}, 
      author={Jie Liu and Gongye Liu and Jiajun Liang and Yangguang Li and Jiaheng Liu and Xintao Wang and Pengfei Wan and Di Zhang and Wanli Ouyang},
      year={2025},
      eprint={2505.05470},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2505.05470}, 
}