Dataset Viewer
Auto-converted to Parquet Duplicate
The dataset viewer is not available for this split.
External: Generic Unexpected error: Unexpected (temporary) at read, context: { url: https://huggingface.co/datasets/leffff/diffusion-distillation-workshop/resolve/refs%2Fconvert%2Fparquet/default/train/0000.parquet, called: reqwest::fetch, service: hf, path: default/train/0000.parquet, range: 485-5603, read: 0 } => read data from http response, source: error decoding response body
Error code:   UnexpectedError

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Diffusion Distillation Workshop dataset

Teacher samples for a hands-on workshop on diffusion step distillation (Consistency Distillation, LADD, DMD, PDD). The teacher is Sana-600M-512px.

Every row contains the text prompt, the teacher's prompt embeddings, the generated latent, and the decoded 512×512 image. With it, a Colab student can skip the 2.6B-parameter Gemma-2 text encoder and the teacher sampling and go straight to distillation.

split rows prompts from
train 4096 open-image-preferences-v1 simplified_prompt, balanced over its 12 style categories (≈341 each)
eval 64 PartiPrompts, balanced over its 12 categories

Columns

column content
prompt the text actually fed to the teacher
source_prompt, category, subcategory, source provenance (for PartiPrompts, subcategory is the Challenge)
seed torch.Generator("cuda").manual_seed(seed) for the initial noise
image decoded 512×512 PNG
latent float16 bytes, shape (32, 16, 16). DC-AE latent in model space: the x₀ the transformer sees. Decode with vae.decode(latent / 0.41407)
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.

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. Generated on a single H100.

Loading

import numpy as np, torch, pyarrow.parquet as pq
from huggingface_hub import hf_hub_download

path = hf_hub_download("leffff/diffusion-distillation-workshop", "data/train-00000-of-00008.parquet", repo_type="dataset")
t = pq.read_table(path, columns=["prompt", "latent", "prompt_embeds", "prompt_attention_mask"]).to_pydict()
latents = torch.from_numpy(np.stack([np.frombuffer(b, np.float16).reshape(32, 16, 16) for b in t["latent"]]))
embeds = torch.from_numpy(np.stack([np.frombuffer(b, np.float16).reshape(128, 2304) for b in t["prompt_embeds"]]))
masks = torch.from_numpy(np.stack([np.frombuffer(b, np.uint8) for b in t["prompt_attention_mask"]])).long()

License

Apache-2.0. The prompts come from apache-2.0 datasets, and the images and latents were generated by the apache-2.0 Sana-600M model.

Downloads last month
46