RealAlign-Dataset / README.md
Xixixixihahahaha's picture
Upload README.md
7c35539 verified
---
license: cc-by-nc-4.0
task_categories:
- text-to-image
language:
- en
tags:
- preference-alignment
- diffusion-models
- text-to-image
- dpo
- preference-pairs
pretty_name: RealAlign Preference Dataset
size_categories:
- 1K<n<10K
---
# RealAlign Preference Dataset
This is the curated preference dataset for the paper
**"When Preference Labels Fall Short: Aligning Diffusion Models from Real Data" (ICML 2026)**.
| Resource | Link |
|---|---|
| πŸ“„ Paper | [arXiv:2605.19839](https://arxiv.org/abs/2605.19839) |
| 🌐 Project page | [cwyxx.github.io/RealAlign](https://cwyxx.github.io/RealAlign/) |
| πŸš€ Code | [github.com/Cwyxx/RealAlign](https://github.com/Cwyxx/RealAlign) |
## Dataset summary
RealAlign studies whether **real data** can replace manually annotated preference labels for
aligning text-to-image diffusion models. Instead of comparing two model-generated images and
labelling which is preferred, we treat a **high-quality reference image as the preferred ("win")**
sample β€” a real photograph (HPDv3) or a curated high-quality generated image (Civitai-top) β€”
and contrast it with a **perturbed / inpainted version as the non-preferred
("lose")** sample. This yields preference pairs without any human preference annotation, and we
show such reference-based supervision aligns diffusion models comparably to existing
preference-based methods.
This dataset provides the resulting `(real, fake)` preference pairs used to train the RealAlign
SD-1.5 and SD-3.5-M models.
## Sources
This release contains two sources, kept as separate subsets:
| Subset | Reference (win) images | Prompt / image origin |
|---|---|---|
| `HPDv3/` | real photographs | Human Preference Dataset v3 |
| `Civitai-top/` | high-quality generated images | Civitai top SFW images |
> **Note:** The Pick-a-Pic v2 subset used in the paper is **not** included in this release because the
> source data may contain not-safe-for-work (NSFW) content.
## Curation pipeline
The pairs are produced by RealAlign's four-stage data-curation pipeline
(see [`data_curation/`](https://github.com/Cwyxx/RealAlign/tree/main/data_curation) in the code repo):
1. **Extract** β€” collect `(uid, prompt)` entries for each source.
2. **Construct pairs** β€” for each reference image, generate the non-preferred ("fake")
counterpart by computing a **UΒ²-Net saliency mask** and **inpainting** the salient region with a
text-to-image model (SD / SD-3.5 / PixArt). The real image becomes the "win" sample and the
inpainted image the "lose" sample for the same prompt.
3. **Score** β€” score candidates with colorfulness, **PickScore**, and a **Qwen3-VL** anime
classifier.
4. **Filter** β€” curate per source. HPDv3 uses `anime drop β†’ color filter β†’ discard negative β†’
top-512`; Civitai-top applies top selection only.
## Directory layout
```
HPDv3/
β”œβ”€β”€ HPDv3.csv # uid, prompt, win_image_path, lose_image_path
β”œβ”€β”€ real/<uid>.png # reference (preferred / "win") images
└── fake/<uid>.png # perturbed (non-preferred / "lose") images
Civitai-top/
β”œβ”€β”€ Civitai-top.csv
β”œβ”€β”€ real/<uid>.png
└── fake/<uid>.png
```
Each subset ships **512 final curated preference pairs** as the images under `real/` and `fake/`,
paired by `uid`. The accompanying CSV may list additional candidate rows from earlier curation
stages (HPDv3 in particular), so treat the images present in `real/`/`fake/` as the delivered set
and intersect the CSV by `uid` with those files.
### CSV columns
| Column | Description |
|---|---|
| `uid` | Pair identifier; matches the `<uid>.png` filenames in `real/` and `fake/`. |
| `prompt` | Text prompt for the pair. |
| `win_image_path` | Path to the preferred (real) image. |
| `lose_image_path` | Path to the non-preferred (fake / inpainted) image. |
> **Note:** `win_image_path` / `lose_image_path` in the CSVs are the absolute paths from the
> original training machine (e.g. `/data_center/.../real/<uid>.png`). When using this dataset,
> resolve images by `uid` against the local `real/` and `fake/` folders, or remap the path prefix
> to your download location.
## Usage
The curated CSV is consumed directly by the RealAlign trainers (`csv_file_path_train` for SD-1.5,
`config.{irl,dpo}.csv_file_path` for SD-3.5-M). See the
[GitHub repository](https://github.com/Cwyxx/RealAlign) for full training instructions.
## Citation
If you find this dataset useful, please consider citing:
```bibtex
@article{chen2026preference,
title={When Preference Labels Fall Short: Aligning Diffusion Models from Real Data},
author={Chen, Weiyan and Deng, Weijian and Xiao, Yao and Tu, Weijie and Dong, ZiYi and Radwan, Ibrahim and Lin, Liang and Wei, Pengxu},
journal={arXiv preprint arXiv:2605.19839},
year={2026}
}
```