Run this model with HF Jobs
Run ma-xu/Harmony-SD3.5M on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/ma-xu/Harmony-SD3.5M. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/ma-xu/Harmony-SD3.5M on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use ma-xu/Harmony-SD3.5M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ma-xu/Harmony-SD3.5M with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Harmony: SD3.5-M LoRA checkpoints
LoRA weights (rank 32, alpha 64, attention projections) of Stable Diffusion 3.5 Medium, post-trained with Harmony, the weight-free multi-reward advantage of Harmony without Uniformity: Towards Weight-Free Multi-Reward Reinforcement Learning (project page, code). Each subfolder is the EMA model after 500 iterations of one run in Tab. 2 of the paper (training seed 42).
| Subfolder | Prompts | Training rewards | Algorithm | Method |
|---|---|---|---|---|
ocr_diffusionnft |
text rendering | OCR, PickScore, HPSv3, CLIPScore | DiffusionNFT | Harmony |
ocr_flowgrpofast |
text rendering | OCR, PickScore, HPSv3, CLIPScore | Flow-GRPO-Fast | Harmony |
general_diffusionnft |
general | PickScore, HPSv3, CLIPScore | DiffusionNFT | Harmony (advantage × 0.35) |
general_flowgrpofast |
general | PickScore, HPSv3, CLIPScore | Flow-GRPO-Fast | Harmony |
ocr_diffusionnft_lambda |
text rendering | OCR, PickScore, HPSv3, CLIPScore | DiffusionNFT | Harmony-λ, mean OCR ≥ 0.92 |
ocr_flowgrpofast_lambda |
text rendering | OCR, PickScore, HPSv3, CLIPScore | Flow-GRPO-Fast | Harmony-λ, mean OCR ≥ 0.92 |
All runs use 48 prompts × 24 images per iteration at 512 × 512 and are trained and evaluated without CFG (guidance scale 1).
Usage
import torch
from diffusers import StableDiffusion3Pipeline
from huggingface_hub import snapshot_download
from peft import PeftModel
pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-medium", torch_dtype=torch.float16)
lora = snapshot_download("ma-xu/Harmony-SD3.5M", allow_patterns="ocr_diffusionnft/*")
pipe.transformer = PeftModel.from_pretrained(pipe.transformer, f"{lora}/ocr_diffusionnft")
pipe.to("cuda")
image = pipe('A neon sign above a small diner that says "OPEN 24 HOURS"', num_inference_steps=40,
guidance_scale=1.0, height=512, width=512).images[0]
The paper's evaluation (one fixed initial noise per prompt, 40 steps) is t2i/sample.py in the code repository, and
the held-out rewards (OCR-VL, ImageReward, Aesthetic, UnifiedReward) are in t2i/eval/.
Results
Mean rank over all rewards (nine on text rendering, seven on general prompts: the training rewards and the held-out ones), on the scores averaged over the last five evaluations; lower is better.
| Method | Text rendering, DiffusionNFT | Text rendering, Flow-GRPO-Fast | General, DiffusionNFT | General, Flow-GRPO-Fast |
|---|---|---|---|---|
| Weighted Sum | 4.56 | 5.78 | 3.43 | 3.29 |
| GDPO | 2.89 | 3.17 | 2.43 | 2.57 |
| Harmony | 2.33 | 2.94 | 2.00 | 1.86 |
| Harmony-λ | 3.44 | 3.50 | – | – |
License
The weights are a derivative of Stable Diffusion 3.5 Medium and follow the Stability AI Community License.
Citation
@article{ma2026harmony,
title = {Harmony without Uniformity: Towards Weight-Free Multi-Reward Reinforcement Learning},
author = {Ma, Xu and Zhang, Yitian and Zhan, Xiaohang and Wang, Yilin and Liu, Ding and Zhou, Yuqian and
Liu, Difan and Mei, Yiqun and Wang, Zihan and Xu, Songtao and Fu, Yun},
year = {2026}
}
- Downloads last month
- -
Model tree for ma-xu/Harmony-SD3.5M
Base model
stabilityai/stable-diffusion-3.5-medium