Datasets:
id int64 0 2.05k | split stringclasses 1
value | prompt stringlengths 52 222 | text stringlengths 2 16 | source_id int64 7 13k | seeds listlengths 5 5 | images images listlengths 5 5 | ocr listlengths 5 5 | pickscore listlengths 5 5 | aesthetic listlengths 5 5 | clip listlengths 5 5 | ocr_read listlengths 5 5 | latents unknown | prompt_embeds unknown | prompt_attention_mask unknown |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | train | "A black plush bath mat features a hand-drawn white octopus illustration with suckers and tentacles,(...TRUNCATED) | to | 6,287 | [
0,
1,
2,
3,
4
] | [{"src":"https://datasets-server.huggingface.co/assets/leffff/diffusion-alignment-workshop/--/{datas(...TRUNCATED) | [
0.5,
1,
1,
1,
1
] | [
23.55708122253418,
21.064821243286133,
22.5152587890625,
23.210758209228516,
23.43314552307129
] | [
5.081730365753174,
4.316678524017334,
5.384633541107178,
4.781750202178955,
5.192521572113037
] | [
34.243751525878906,
32.364742279052734,
32.779457092285156,
35.1571159362793,
31.366121292114258
] | [
"OT",
"Too\nToo",
"Octopus",
"TO",
"100% cotton"
] | "7Lk7ub+9z76zuca75b/Fv7y+wrmUvKBAbTauvHk48jwHt2irkLXjuvy6Qr1Yvty+DbxHuKw+Hz8MuoUtgjXPuzy3E7yAuRG827v(...TRUNCATED) | "ALF4pfA0MLrwtIC3ELSwMygkuLTItjgsGDCYtUCi2KwwsmizkLx4OWi28DYwN/CtGDZIMIA3qLRgNbg1yDMAtOA2aBqYMRgzoLv(...TRUNCATED) | "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA(...TRUNCATED) |
1 | train | "A person holds a wooden sign with \"Just Meowed\" written on it, set against a green background wit(...TRUNCATED) | Just Meowed | 6,855 | [
10000,
10001,
10002,
10003,
10004
] | [{"src":"https://datasets-server.huggingface.co/assets/leffff/diffusion-alignment-workshop/--/{datas(...TRUNCATED) | [
0.699999988079071,
0.4000000059604645,
0.6000000238418579,
0.800000011920929,
0.5
] | [
23.086959838867188,
21.527193069458008,
23.49083709716797,
23.27699851989746,
22.248090744018555
] | [
5.436553955078125,
5.467471599578857,
5.774566650390625,
5.784126281738281,
5.654145240783691
] | [
29.433483123779297,
29.259660720825195,
32.47238540649414,
26.953638076782227,
34.64958572387695
] | [
"Justt\nmeed",
"Julexmoow",
"uust Mew",
"Just Me Med",
"iyut\nmemd"
] | "SSslsak3PDi+NFi4hDSqMbqxarhVuFe4ILnFN4s2GzvFvJaur7ZcOna4GDwNtTy177zJutWukzn4tom6VzWBLX+2IbXLOGC8o7z(...TRUNCATED) | "ALF4pfA0MLrwtIC3ELSwMygkuLTItjgsGDCYtUCi2KwwsmizkLx4OWi28DYwN/CtGDZIMIA3qLRgNbg1yDMAtOA2aBqYMRgzoLv(...TRUNCATED) | "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA(...TRUNCATED) |
2 | train | "A collection of nine colorful balloons in various sizes and designs, arranged in a circular pattern(...TRUNCATED) | Oh baby | 7,023 | [
20000,
20001,
20002,
20003,
20004
] | [{"src":"https://datasets-server.huggingface.co/assets/leffff/diffusion-alignment-workshop/--/{datas(...TRUNCATED) | [
0.8333333134651184,
0.5,
0.8333333134651184,
0.6666666865348816,
1
] | [
22.621084213256836,
22.308931350708008,
22.09987449645996,
21.300151824951172,
21.865352630615234
] | [
4.745444297790527,
4.76338005065918,
4.555150985717773,
4.526753902435303,
4.551386833190918
] | [
31.370574951171875,
33.9163703918457,
38.07254409790039,
35.93171691894531,
32.33181381225586
] | [
"Oh Dh\nbaby",
"Oh\nOdy\nOdy\nOdy",
"OBaby",
"ohab\nunh",
"Oh baby"
] | "KLaVsqw1RrwJMco69Dcmv3G9ejCFsyAwpbr/try8w7h4tF43AblPPMMyzb1Ev2i4Q7Z5uDI9yLx5vFi1Mb2VtBWytjpWrja4S76(...TRUNCATED) | "ALF4pfA0MLrwtIC3ELSwMygkuLTItjgsGDCYtUCi2KwwsmizkLx4OWi28DYwN/CtGDZIMIA3qLRgNbg1yDMAtOA2aBqYMRgzoLv(...TRUNCATED) | "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA(...TRUNCATED) |
3 | train | "A stylized graphic of a waffle cone ice cream with cherry on top, cut into a cookie cutter shape, w(...TRUNCATED) | Sugartess | 876 | [
30000,
30001,
30002,
30003,
30004
] | [{"src":"https://datasets-server.huggingface.co/assets/leffff/diffusion-alignment-workshop/--/{datas(...TRUNCATED) | [
1,
0.6666666865348816,
0.7777777910232544,
0.8888888955116272,
0.8888888955116272
] | [
22.06061363220215,
21.35498046875,
21.171268463134766,
20.970197677612305,
21.087312698364258
] | [
4.697486877441406,
4.709914207458496,
4.813823223114014,
4.61509370803833,
4.417153358459473
] | [
38.529598236083984,
33.46847152709961,
31.805187225341797,
35.63191223144531,
33.005802154541016
] | [
"Sugartess",
"Sugaiiss",
"Sugacatess",
"Sugatesss",
"Sugatess"
] | "1S4au9u0Dj3lMrCtlru0tPC6urzhNyi64LwdPec23bNnNFu7obhPOq+z0D3ptz2xhb5eOWE5+yu0tnxAKDyiNnU8a7lPs9o5ILM(...TRUNCATED) | "ALF4pfA0MLrwtIC3ELSwMygkuLTItjgsGDCYtUCi2KwwsmizkLx4OWi28DYwN/CtGDZIMIA3qLRgNbg1yDMAtOA2aBqYMRgzoLv(...TRUNCATED) | "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA(...TRUNCATED) |
4 | train | "A young woman with braided hair and serious expression sits cross-legged, wearing a white shirt, su(...TRUNCATED) | Brandy | 2,578 | [
40000,
40001,
40002,
40003,
40004
] | [{"src":"https://datasets-server.huggingface.co/assets/leffff/diffusion-alignment-workshop/--/{datas(...TRUNCATED) | [
0.6666666865348816,
0.5,
0.5,
1,
0.8333333134651184
] | [
23.92255401611328,
23.96077537536621,
23.47895050048828,
23.388080596923828,
23.211536407470703
] | [
5.74484920501709,
6.176167964935303,
5.923863410949707,
5.659192085266113,
5.916626930236816
] | [
28.11743927001953,
28.1923885345459,
30.529964447021484,
29.486061096191406,
29.140460968017578
] | [
"Brangababy",
"Bunny",
"Bromy",
"Brandy\nOstah",
"Brendy"
] | "6rgDvFu+zrUyscq4wcBDwAnBhb4CuTKyJTkQNCC8qrmAOfY3Hb7ptUsicsAav2u6r7UKKqa6e75TMiE8RTmbvQi3fDpoLza+dL5(...TRUNCATED) | "ALF4pfA0MLrwtIC3ELSwMygkuLTItjgsGDCYtUCi2KwwsmizkLx4OWi28DYwN/CtGDZIMIA3qLRgNbg1yDMAtOA2aBqYMRgzoLv(...TRUNCATED) | "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA(...TRUNCATED) |
5 | train | "A hand holds a purple beetroot keychain with \"Goodness\" written on it, attached to a purple cosme(...TRUNCATED) | Goodness | 1,079 | [
50000,
50001,
50002,
50003,
50004
] | [{"src":"https://datasets-server.huggingface.co/assets/leffff/diffusion-alignment-workshop/--/{datas(...TRUNCATED) | [
0.375,
0.5,
0.375,
0.625,
0.375
] | [
19.796615600585938,
21.08901023864746,
21.518455505371094,
21.276330947875977,
21.249937057495117
] | [
4.953564167022705,
4.884869575500488,
4.906373023986816,
5.261124610900879,
5.195805549621582
] | [
33.79531478881836,
35.84256362915039,
37.06724166870117,
40.78831481933594,
37.79412841796875
] | [
"GOXGOLD",
"Godsuns",
"Goverlockers",
"Goddanes",
"Gooooou"
] | "ZrM/NWA58q7uveu2wjGIqkA21b6HPCM+jrwRPXm2czwjtvCkzLUtLDC5wqwdOBE5iz3Pv30te7I5uwQ+hbt0vRW4Ub5xJJ2tszw(...TRUNCATED) | "ALF4pfA0MLrwtIC3ELSwMygkuLTItjgsGDCYtUCi2KwwsmizkLx4OWi28DYwN/CtGDZIMIA3qLRgNbg1yDMAtOA2aBqYMRgzoLv(...TRUNCATED) | "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA(...TRUNCATED) |
6 | train | "A person wears a face mask with \"FAKE\" written across it, questioning the authenticity of COVID-1(...TRUNCATED) | FAKE | 13,035 | [
60000,
60001,
60002,
60003,
60004
] | [{"src":"https://datasets-server.huggingface.co/assets/leffff/diffusion-alignment-workshop/--/{datas(...TRUNCATED) | [
0.25,
0.5,
0.5,
0.25,
0.75
] | [
21.42654037475586,
20.83917236328125,
22.218692779541016,
20.715835571289062,
22.464597702026367
] | [
5.716703414916992,
5.38015079498291,
4.683236122131348,
5.608155250549316,
4.9294586181640625
] | [
24.932920455932617,
22.701473236083984,
31.0645751953125,
28.269163131713867,
26.032594680786133
] | ["TheBitterHorseHorseHorseHorseHorseHorseHorseHorseHorseHorseH","Aaa late on the","FaaLe","LUNGEN\nB(...TRUNCATED) | "87HssOe10rmxsxu0C7OnvKu2F76huN28Qb8MtSCw4TjEMiq4T7wnuduk5LKWu7o9kbToNlW69rZVLsof0L60vT2rULxiuFeuHK1(...TRUNCATED) | "ALF4pfA0MLrwtIC3ELSwMygkuLTItjgsGDCYtUCi2KwwsmizkLx4OWi28DYwN/CtGDZIMIA3qLRgNbg1yDMAtOA2aBqYMRgzoLv(...TRUNCATED) | "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA(...TRUNCATED) |
7 | train | "A man points at a urinal in a public restroom, as another man uses it, with \"UC... Prank\" written(...TRUNCATED) | UC... Prank | 8,687 | [
70000,
70001,
70002,
70003,
70004
] | [{"src":"https://datasets-server.huggingface.co/assets/leffff/diffusion-alignment-workshop/--/{datas(...TRUNCATED) | [
0.5714285969734192,
0.2857142984867096,
0.4285714328289032,
0.7142857313156128,
0.7142857313156128
] | [
21.596887588500977,
21.590194702148438,
22.220857620239258,
22.41560935974121,
22.169536590576172
] | [
5.166284561157227,
5.070609092712402,
4.902932167053223,
5.109899044036865,
4.948582649230957
] | [
30.245784759521484,
37.42087936401367,
36.49697494506836,
35.711158752441406,
41.23594665527344
] | [
"Go Pcorn\nKOTK",
"L'Pok.\nADP",
"u.c.c\nPomk",
"UC PPAK",
"LUC\nPRK"
] | "ozxJPBW2brPkun3C67zYONa9QL7CvAW+3cD2uge08SC1Oss797sTvPupLr4IvP816TbJMviykLyauqy63LTHuLY2GT8vs7ay77j(...TRUNCATED) | "ALF4pfA0MLrwtIC3ELSwMygkuLTItjgsGDCYtUCi2KwwsmizkLx4OWi28DYwN/CtGDZIMIA3qLRgNbg1yDMAtOA2aBqYMRgzoLv(...TRUNCATED) | "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA(...TRUNCATED) |
8 | train | "A stylized rooster illustration on a white ceramic plate with \"To Rise Early\" written above and b(...TRUNCATED) | To Rise Early | 6,938 | [
80000,
80001,
80002,
80003,
80004
] | [{"src":"https://datasets-server.huggingface.co/assets/leffff/diffusion-alignment-workshop/--/{datas(...TRUNCATED) | [
0.4545454680919647,
0.3636363744735718,
0.4545454680919647,
0.3636363744735718,
0.3636363744735718
] | [
21.57911491394043,
22.09947395324707,
22.06571388244629,
21.20424461364746,
21.764156341552734
] | [
4.702005386352539,
4.215950012207031,
5.061685085296631,
4.832962989807129,
4.788569927215576
] | [
32.79654312133789,
33.6732063293457,
32.72401428222656,
29.169172286987305,
32.225791931152344
] | ["To e Rubeey\nJoe Filtz","Too Disg\nAftv","Tore\nKålsy\nR. P. Lo\nS 02","Ti dro\nTiure\nAuréa","T(...TRUNCATED) | "5bjYt+i4krhYqTy8mLwfufa4KLscvI62ErdQtoa2+bgtt9m0KK9JvG2+RrDHvru1JL1avBU8qDyitRClNSnUtB64ObEOvDa55zK(...TRUNCATED) | "ALF4pfA0MLrwtIC3ELSwMygkuLTItjgsGDCYtUCi2KwwsmizkLx4OWi28DYwN/CtGDZIMIA3qLRgNbg1yDMAtOA2aBqYMRgzoLv(...TRUNCATED) | "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA(...TRUNCATED) |
9 | train | "A vintage slate blackboard with \"happy birthday\" written in white chalk, set against a rustic bac(...TRUNCATED) | happy birthday | 1,788 | [
90000,
90001,
90002,
90003,
90004
] | [{"src":"https://datasets-server.huggingface.co/assets/leffff/diffusion-alignment-workshop/--/{datas(...TRUNCATED) | [
1,
1,
1,
1,
1
] | [
25.02524185180664,
25.403209686279297,
25.04685401916504,
24.7146053314209,
24.879545211791992
] | [
5.051603317260742,
5.006009101867676,
5.059384346008301,
4.920750617980957,
5.036703109741211
] | [
27.854764938354492,
27.184131622314453,
26.87137794494629,
25.692588806152344,
28.234840393066406
] | [
"happy\nBirthday",
"Happy Birthday",
"Happy Birthday",
"Happy Birthday",
"Happy Birthday"
] | "LThYNj81LzSQMuM2Q7x+uQ+2Sba0OKG897LCKVwwaroyuA+xoDjVrRy1RTCDsKq8+b7su027UbVpvY23CLoju9u5Wb7WsKW+Pbx(...TRUNCATED) | "ALF4pfA0MLrwtIC3ELSwMygkuLTItjgsGDCYtUCi2KwwsmizkLx4OWi28DYwN/CtGDZIMIA3qLRgNbg1yDMAtOA2aBqYMRgzoLv(...TRUNCATED) | "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA(...TRUNCATED) |
Diffusion Alignment Workshop dataset
Offline data for a hands-on workshop on aligning a diffusion model with rewards (SFT, RWR, DPO, online DPO, GRPO, DiffusionNFT, on-policy distillation). The model is Sana-600M-512px and the task is text rendering: every prompt asks for a short string to be written in the image.
For every prompt there are 5 samples of the model, each scored with four rewards. With it, a Colab student can run the offline methods without sampling or scoring anything, and the online methods without the 2.6B Gemma-2 text encoder. It is the alignment companion of leffff/diffusion-distillation-workshop (same model, same embedding format).
| split | prompts | samples |
|---|---|---|
train |
2048 | 5 per prompt |
eval |
64 | 5 per prompt |
Prompts come from leffff/Diffusion-Reward-Modeling-for-Text-Rendering-Dataset (train / test splits), filtered to:
- exactly one quoted target, which must be written in the image: a rendering keyword next to the quote (
written,spelled,the word,sign,label,a mug that says, ...), and not speech or an attribution (he says "...","...", says Stan Lee,written by); - short ASCII targets that a 600M model at 512 px can plausibly render: at most 3 words and 16 characters;
- at most 2 prompts per target string (there are 219 "Happy Birthday" prompts in the source).
Columns (one row per prompt)
| column | content |
|---|---|
prompt, text |
the prompt and the string that must appear in the image |
source_id |
the row id in the source dataset |
seeds |
5 seeds, torch.Generator("cuda").manual_seed(seed) for the initial noise of each sample |
images |
5 decoded 512×512 JPEGs (quality 95) |
latents |
float16 bytes, shape (5, 32, 16, 16). DC-AE latents in model space (the x₀ the transformer sees). Decode with vae.decode(latent / 0.41407) |
ocr |
5 × OCR-Levenshtein reward in [0, 1]: 1 - min(d, len(t)) / len(t), where d is the fewest character edits that make the target t appear somewhere in the transcription (case, spaces and punctuation ignored) |
ocr_read |
5 × what the OCR model (Qwen3-VL-2B-Instruct, greedy) read |
pickscore |
5 × PickScore (logit_scale · cos, ≈ 15–25) |
aesthetic |
5 × LAION aesthetic predictor v2 on CLIP ViT-L/14 (weights, ≈ 1–10) |
clip |
5 × CLIP score, 100 · cos(image, prompt) with openai/clip-vit-large-patch14 |
prompt_embeds |
float16 bytes, shape (128, 2304). Gemma-2 hidden states from Sana's encode_prompt with the complex human instruction, max_sequence_length=128 |
prompt_attention_mask |
uint8 bytes, shape (128,) |
null_prompt_embeds.safetensors holds the unconditional (empty negative prompt) embedding and mask for classifier-free guidance. meta.json holds all generation parameters and the reward definitions.
Generation
SanaPipeline default sampler (flow DPM-Solver), 20 steps, CFG 4.5, 512×512, transformer in fp16, Gemma-2 in bf16, DC-AE in fp32, on H100s. The rewards are computed on the decoded fp32 images before JPEG encoding. Code: generate_dataset.py and rewards.py of the workshop.
Loading
import numpy as np, torch, pyarrow.parquet as pq
from huggingface_hub import hf_hub_download
path = hf_hub_download("leffff/diffusion-alignment-workshop", "data/train-00000-of-00008.parquet", repo_type="dataset")
t = pq.read_table(path, columns=["prompt", "text", "latents", "ocr", "prompt_embeds", "prompt_attention_mask"]).to_pydict()
latents = torch.from_numpy(np.stack([np.frombuffer(b, np.float16).reshape(5, 32, 16, 16) for b in t["latents"]]))
embeds = torch.from_numpy(np.stack([np.frombuffer(b, np.float16).reshape(128, 2304) for b in t["prompt_embeds"]]))
ocr = torch.tensor(t["ocr"]) # (n, 5)
License
Apache-2.0 for the images, latents and rewards generated by the apache-2.0 Sana-600M model. The prompts come from the MIT-licensed leffff/Diffusion-Reward-Modeling-for-Text-Rendering-Dataset.
- Downloads last month
- 48