Configuration Parsing Warning:In adapter_config.json: "peft.task_type" must be a string

Self-OPD

On-Policy Distillation for Flow Matching Models without Teacher

 

Model Card

This repository hosts the mixed-reward LoRA weights for Self-OPD, a teacher-free, on-policy distillation framework for flow-matching text-to-image models.

Self-OPD uses the current policy's self-exploration to construct step-wise distillation targets and jointly improve compositional generation, text rendering, and human preference alignment.

Base Model

The LoRA adapter is trained from stabilityai/stable-diffusion-3.5-medium. Powered by Stability AI.

Usage

Use the official Self-OPD repository for inference and evaluation:

git clone https://github.com/Shiy-Zhang/Self-OPD.git
cd Self-OPD

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

bash scripts/infer.sh

The inference script downloads ShiyiZhang/Self-OPD automatically. Access to the gated SD3.5-Medium base model must be accepted on Hugging Face before first use.

Examples

The three samples below are produced by scripts/infer.py with its default settings (bfloat16, 40 inference steps, guidance scale 4.5, 512×512, max_sequence_length=256). For a single prompt the image generator is seeded with exactly --seed, so each command below regenerates the image above it. Running bash scripts/infer.sh produces all three.

Sample Prompt Seed
desert A vast desert landscape under a scorching sun, where a mirage forms the shimmering letters "Water This Way" on the distant horizon, creating an illusion of hope in an otherwise barren and arid environment. 142
storefront A storefront with 'Google Brain Toronto' written on it. 215
laptop A laptop on top of a teddy bear. 268
python scripts/infer.py \
  --prompt "A vast desert landscape under a scorching sun, where a mirage forms the shimmering letters \"Water This Way\" on the distant horizon, creating an illusion of hope in an otherwise barren and arid environment." \
  --seed 142

python scripts/infer.py \
  --prompt "A storefront with 'Google Brain Toronto' written on it." \
  --seed 215

python scripts/infer.py \
  --prompt "A laptop on top of a teddy bear." \
  --seed 268

Citation

@article{zhang2026self,
  title={Self-OPD: On-Policy Distillation for Flow Matching Models without Teacher},
  author={Zhang, Shiyi and Liu, Mushui and Tong, Yunze and He, Wanggui and Zou, Siyu and Liu, Jinlong and Yu, Yunlong and Song, Jian and Jiang, Hao and Huang, Pipei and others},
  journal={arXiv preprint arXiv:2608.26872},
  year={2026}
}
Downloads last month
26
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ShiyiZhang/Self-OPD

Adapter
(107)
this model

Paper for ShiyiZhang/Self-OPD