CoolFace
Modelpublic

CostaliyA/Flow-OPD

sourceHugging Faceupdated 4mo agoView on Hugging Face
1likes20downloads
Model Card

Flow-OPD

<div align="center">

![arXiv](https://arxiv.org/abs/2605.08063) ![GitHub](https://github.com/CostaliyA/Flow-OPD) ![HuggingFace](https://huggingface.co/CostaliyA/Flow-OPD)

Flow-OPD: On-Policy Distillation for Flow Matching Models โ€” Evaluated on SD-3.5-Medium, Flow-OPD achieves +18pt average improvement over vanilla GRPO.

</div>

Quick Start

python
import torch
from diffusers import StableDiffusion3Pipeline
from peft import PeftModel

model_id = "stabilityai/stable-diffusion-3.5-medium"
lora_ckpt_path = "CostaliyA/Flow-OPD"#dev ckpt
device = "cuda"

pipe = StableDiffusion3Pipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe.transformer = PeftModel.from_pretrained(pipe.transformer, lora_ckpt_path)
pipe.transformer = pipe.transformer.merge_and_unload()
pipe = pipe.to(device)

prompt = "a photo of a black kite and a green bear"
image = pipe(prompt, height=512, width=512, num_inference_steps=40, guidance_scale=4.5, negative_prompt="").images[0]
image.save("flow_opd.png")

Results

ModelGenEvalOCRDeQAPickScoreAverage
SD-3.5-M (base)0.630.594.0721.640.72
GRPO-Mix0.730.834.3321.840.82
Flow-OPD0.920.944.3523.080.90

Citation

bibtex
@article{fang2026flow,
  title={Flow-OPD: On-Policy Distillation for Flow Matching Models},
  author={Fang, Zhen and Huang, Wenxuan and Zeng, Yu and Zhao, Yiming and Chen, Shuang and Feng, Kaituo and Lin, Yunlong and Chen, Lin and Chen, Zehui and Cao, Shaosheng and others},
  journal={arXiv preprint arXiv:2605.08063},
  year={2026}
}