[Paper Review] DiffusionDB: A Large-scale Prompt Gallery Dataset for Text-to-Image Generative Models
This paper introduces DiffusionDB, a 6.5TB dataset of 14 million text-to-image generations from Stable Diffusion, featuring 1.8 million unique prompts and full hyperparameter metadata. It enables systematic study of prompt engineering, model behavior, and misuse patterns, revealing hyperparameter-induced errors and evidence of misinformation generation, with the dataset released under CC0 for broad research use.
With recent advancements in diffusion models, users can generate high-quality images by writing text prompts in natural language. However, generating images with desired details requires proper prompts, and it is often unclear how a model reacts to different prompts or what the best prompts are. To help researchers tackle these critical challenges, we introduce DiffusionDB, the first large-scale text-to-image prompt dataset totaling 6.5TB, containing 14 million images generated by Stable Diffusion, 1.8 million unique prompts, and hyperparameters specified by real users. We analyze the syntactic and semantic characteristics of prompts. We pinpoint specific hyperparameter values and prompt styles that can lead to model errors and present evidence of potentially harmful model usage, such as the generation of misinformation. The unprecedented scale and diversity of this human-actuated dataset provide exciting research opportunities in understanding the interplay between prompts and generative models, detecting deepfakes, and designing human-AI interaction tools to help users more easily use these models. DiffusionDB is publicly available at: https://poloclub.github.io/diffusiondb.
Motivation & Objective
- To address the challenge of effective prompt engineering in text-to-image diffusion models, where users struggle to generate desired outputs due to trial-and-error and lack of systematic guidance.
- To provide a large-scale, real-user dataset capturing the interplay between prompts, hyperparameters, and image outputs to support empirical analysis of model behavior.
- To identify prompt patterns and hyperparameter configurations that lead to model errors or harmful outputs, such as misinformation or nonconsensual content.
- To open new research avenues in NLP, computer vision, and HCI by enabling studies on prompt optimization, model interpretability, and deepfake detection.
- To support the development of user-friendly tools for human-AI interaction in text-to-image generation through real-world data.
Proposed method
- Web scraping of user-generated images, prompts, and hyperparameters from the official Stable Diffusion Discord server, using DiscordChatExporter to extract chat logs and media.
- Collection of metadata including seed, step count, classifier-free guidance (CFG) scale, sampler type, image resolution, creation timestamp, and Discord user hash for each image.
- Application of state-of-the-art NSFW detection models to compute safety scores for each image and prompt, enabling filtering and reporting of potentially harmful content.
- Anonymization of user identifiers by hashing Discord usernames and removal of personal information to protect privacy.
- Design of a flexible, hierarchical file structure to organize the dataset across prompts, hyperparameters, and image files for efficient access and analysis.
- Release of the dataset under a CC0 1.0 license and open-sourcing of the data collection and processing pipeline via GitHub for reproducibility and community extension.
Experimental results
Research questions
- RQ1What are the most common syntactic and semantic patterns in real-world text-to-image prompts used with Stable Diffusion?
- RQ2Which hyperparameter configurations (e.g., CFG scale, sampling steps) are most frequently associated with model errors or image quality degradation?
- RQ3How do specific prompt styles correlate with the generation of harmful or NSFW content, even when filtered by the model’s built-in safety mechanisms?
- RQ4To what extent do prompt patterns used in Stable Diffusion generalize to other text-to-image models like DALL-E 2 or Midjourney?
- RQ5Can the dataset be used to train or evaluate tools for prompt optimization, image generation alignment, or deepfake detection?
Key findings
- DiffusionDB contains 14 million images generated using 1.8 million unique prompts, with full hyperparameter metadata including seed, step count, CFG scale, sampler, and image size.
- The dataset reveals that certain prompt styles—such as including 'trending on artstation' or 'unreal engine'—are strongly correlated with higher image detail and quality.
- Specific hyperparameter combinations, particularly high CFG scale and low step count, were frequently linked to model artifacts and generation errors.
- Despite built-in NSFW filters, 14 million images in the dataset include some that were not detected as harmful, indicating potential gaps in automated safety mechanisms.
- Evidence was found of prompts being used to generate misinformation or nonconsensual content, highlighting risks in unregulated text-to-image generation.
- The dataset is publicly available under CC0 1.0, enabling unrestricted use, sharing, and adaptation for research and development.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.