Datasets:
Download README.md from ontenkutsenko/diffusion_trajectories: direct link, hf CLI and curl.
- Browser
- Download file 7.09 kB
-
https://huggingface.co/datasets/ontenkutsenko/diffusion_trajectories/resolve/main/README.md
- Command line
-
hf download hf://datasets/ontenkutsenko/diffusion_trajectories/README.md
-
curl -L -o README.md https://huggingface.co/datasets/ontenkutsenko/diffusion_trajectories/resolve/main/README.md
license: cc-by-4.0
pretty_name: Stable Diffusion 1.5 Denoising Trajectories (ID-2K & COCO-10K)
language:
- en
task_categories:
- text-to-image
tags:
- diffusion
- stable-diffusion
- latent-diffusion
- denoising-trajectories
- retrieval
- redi
- ddim
- interior-design
- ms-coco
- synthetic
size_categories:
- 10K<n<100K
viewer: false
Stable Diffusion 1.5 Denoising Trajectories (ID-2K & COCO-10K)
Full DDIM denoising trajectories (every intermediate latent) recorded from Stable Diffusion 1.5 for 12,000 prompts, together with the prompts that produced them. The data was built as the knowledge base for retrieval-based diffusion experiments in the MSc thesis Enhancing the Efficiency of Diffusion Models (NOVA IMS, 2025), which extends ReDi: instead of denoising from scratch, a new generation retrieves a similar stored trajectory and resumes from one of its intermediate latents, skipping part of the sampling steps.
- Code: ontenkutsenko/Efficient-Retrieval-Based-Diffusion
- Author: Anton Kutsenko
- Supervisors: Mauro Castelli (NOVA IMS) and Marco Buzzelli (University of Milano-Bicocca)
Subsets
| Subset | Files | Prompts | Size | Description |
|---|---|---|---|---|
| ID-2K | trajectories.h5, prompts.jsonl |
2,000 | 2.0 GB | Synthetic interior-design prompts written by a local LLM |
| COCO-10K | coco_trajectories.h5, coco_prompts.jsonl |
10,000 | 9.1 GB | Real MS-COCO captions of furniture scenes |
ID-2K. Structured prompts generated with OpenHermes 2.5 (Mistral 7B) via Ollama. Each prompt was seeded with a randomly sampled space type from a taxonomy covering residential rooms (living rooms, kitchens, bedrooms, home offices…), commercial and institutional interiors (offices, lobbies, clinics, classrooms, museums…), public spaces (cafés, restaurants, airport lounges…) and unusual settings (subway cars, glamping tents, ambulances…). Prompts are long and descriptive, covering materials, lighting, style and audience.
COCO-10K. 10,000 unique captions sampled (seed 42) from MS-COCO train2017 images containing at least one of: chair, couch, potted plant, bed, dining table, toilet. One caption per image. Captions are short and natural, which makes this subset a harder, more diverse retrieval setting than ID-2K.
Generation settings
| Setting | Value |
|---|---|
| Model | stable-diffusion-v1-5/stable-diffusion-v1-5, fp16 |
| Library | 🤗 Diffusers |
| Scheduler | DDIMScheduler (η = 0) |
| Steps | 30 |
| Guidance scale | 7.5 |
| Resolution | 512 × 512 (latent 4 × 64 × 64) |
| Seed | torch.Generator().manual_seed(1024) for every prompt |
Because every prompt uses the same seed, all trajectories start from the same initial noise. Differences between trajectories therefore come only from the prompt, which is what makes nearest-neighbour retrieval over early latents meaningful.
Data format
Prompts (*.jsonl)
One JSON object per line, mapping a trajectory ID to its prompt:
{"ef424318": "Create an image of a luxury villa featuring handcrafted mosaic tile floors, ..."}
{"1a585a50": "A sandwich on top of a plate with juice."}
The ID is the xxhash32 hex digest of the prompt text.
Trajectories (*.h5)
HDF5 files with one gzip-compressed dataset per prompt, named by the same ID.
- Shape:
(30, 1, 4, 64, 64): denoising step × batch × latent channels × height × width - dtype:
float16 - Index
iholds the latent after DDIM stepi + 1. Index0is the latent after the first denoising step, index-1(29) is the final latent that decodes to the image. The pure-noise starting latent is not stored (it is identical for every prompt; regenerate it with seed 1024).
Usage
import json, h5py, torch
from huggingface_hub import hf_hub_download
from diffusers import StableDiffusionPipeline
repo = "ontenkutsenko/diffusion_trajectories"
traj_path = hf_hub_download(repo, "trajectories.h5", repo_type="dataset") # ID-2K
prompt_path = hf_hub_download(repo, "prompts.jsonl", repo_type="dataset")
prompts = {}
with open(prompt_path) as f:
for line in f:
prompts.update(json.loads(line))
with h5py.File(traj_path, "r") as h5:
traj_id = next(iter(h5.keys()))
traj = h5[traj_id][()] # (30, 1, 4, 64, 64) float16
print(prompts[traj_id], traj.shape)
# Decode the final latent to an image
pipe = StableDiffusionPipeline.from_pretrained(
"stable-diffusion-v1-5/stable-diffusion-v1-5", torch_dtype=torch.float16
).to("cuda")
latent = torch.from_numpy(traj[-1]).to("cuda")
with torch.no_grad():
image = pipe.vae.decode(latent / pipe.vae.config.scaling_factor).sample
image = pipe.image_processor.postprocess(image)[0]
Use h5[traj_id][k] to read a single step without loading the whole trajectory.
Intended uses
- Retrieval-based / training-free acceleration of diffusion sampling (ReDi-style step skipping)
- Vector-search research on high-dimensional latent keys (16,384-dim at a single step), e.g. PCA / Product Quantisation compression
- Analysing denoising dynamics: how and when prompt semantics emerge across steps
- Training lightweight models that predict late latents from early ones (distillation, latent refinement)
Limitations
- Single model, scheduler, step count, guidance scale and seed. Trajectories are not directly reusable with other samplers or step schedules.
- ID-2K prompts are LLM-generated and share stylistic patterns; they are not real user prompts.
- COCO-10K is limited to furniture-related scenes and carries MS-COCO caption noise (typos, varying detail).
- Images are not stored; decode the final latent with the SD 1.5 VAE as shown above.
- Generated content inherits the biases of Stable Diffusion 1.5 and of its training data.
License
Dataset released under CC BY 4.0. COCO captions come from MS-COCO (annotations under CC BY 4.0). Latents were generated with Stable Diffusion 1.5, whose outputs are subject to the use restrictions of the CreativeML OpenRAIL-M license.
Citation
@misc{kutsenko2025diffusiontrajectories,
author = {Kutsenko, Anton},
title = {Stable Diffusion 1.5 Denoising Trajectories (ID-2K and COCO-10K)},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/datasets/ontenkutsenko/diffusion_trajectories}}
}
@inproceedings{zhang2023redi,
author = {Zhang, Kexun and Yang, Xianjun and Wang, William Yang and Li, Lei},
title = {ReDi: Efficient Learning-Free Diffusion Inference via Trajectory Retrieval},
booktitle = {Proceedings of the 40th International Conference on Machine Learning},
series = {Proceedings of Machine Learning Research},
volume = {202},
year = {2023}
}