Skip to main content
Browse Models

stabilityai

Stable Diffusion XL

Released

2023-07-26

Family

Stable Diffusion XL

Type

Foundation Model

Downloads

External Download

You are about to open a link to an external source. Verify the URL before continuing.

Download

Model Checkpoint

FP16 · sd_xl_base_1.0_0.9vae.safetensors

Refiner Model

FP16 · sd_xl_refiner_1.0.safetensors

Model Report

Overview

Stable Diffusion XL (SDXL) is an open-access text-to-image generative model developed by Stability AI, first released on July 26, 2023. As the successor to previous Stable Diffusion models, SDXL leverages advancements in multimodal transformer architecture and latent diffusion, setting a new foundation for high-fidelity, versatile, and more controllable image generation. Key developments in SDXL include improved prompt interpretation, nuanced control mechanisms, and architectural changes that extend the model's utility across photorealistic and artistic domains.

SDXL announcement image

Figure 1. Announcement graphic for SDXL, symbolizing the model's scope and ambition in generative AI.

Model Architecture and Technology

SDXL is built upon a robust two-stage latent diffusion framework, which divides the generative process into a “base” stage and a refinement stage. The base model has 3.5 billion parameters and generates initial latent image representations. These latent outputs are then passed to a refiner model, comprising 6.6 billion parameters in the full ensemble pipeline, to further denoise and sharpen the image for greater detail and realism. Notably, the base model can also function independently, reducing compute requirements when the highest fidelity is not essential.

SDXL pipeline diagram

Figure 2. Diagram of the SDXL two-stage latent diffusion pipeline: a base model generates latents, which are then refined for final high-resolution output.

This two-stage “mixture-of-experts” architecture draws on latent diffusion techniques to balance computational efficiency with output quality. The model adopts a UNet backbone, which is approximately three times larger than in Stable Diffusion 1.x, due to more transformer attention blocks and greater cross-attention context. Conditioning mechanisms are introduced on image size and crop coordinates using Fourier feature encodings, allowing SDXL to learn and generate images across diverse aspect ratios without discarding valuable training data.

To capture textual nuance, SDXL integrates two fixed, pre-trained text encoders: OpenCLIP-ViT/G and CLIP-ViT/L, leveraging a context dimension of 2048 and pooled text embeddings. This dual-encoder approach enhances the model’s comprehension and disambiguation of complex or subtle prompt terms.

Training and Datasets

The SDXL base model undergoes a multi-stage training process, beginning with pretraining at a resolution of 256x256 pixels for 600,000 optimization steps on a large, internal dataset, followed by continued training at 512x512 pixels. In the final refinement phase, the model is fine-tuned on a multi-aspect dataset, partitioned into resolution “buckets” to closely match a 1024x1024 pixel area while observing varied aspect ratios.

A discrete-time diffusion schedule with 1,000 steps is employed during training. The refiner is trained in the same latent space, specializing in generating visually detailed, high-resolution outputs through a noising-denoising process targeting the first 200 noise scales, as described in the SDEdit method.

The autoencoder, retrained from scratch for SDXL, uses a larger batch size and exponential moving average parameter tracking. This results in improved reconstructions, as measured by metrics such as PSNR, SSIM, LPIPS, and relative FID rFID.

Fine-tuned SDXL product generation

Figure 3. Example of SDXL fine-tuned product generation: high-fidelity output for a specific object class.

Industrial scene generated by SDXL

Figure 4. Industrial scene output showing SDXL's capability for realistic environmental and architectural rendering.

Fine-tuned SDXL appliance generation

Figure 5. Output from a fine-tuned SDXL model producing realistic product renderings.

Capabilities and Performance

SDXL demonstrates significant increases in image fidelity, prompt sensitivity, and compositional control compared to earlier Stable Diffusion models. The ensemble pipeline demonstrates effectiveness for photorealistic rendering, lighting, shadow detail, and style diversity.

User preference studies indicate that SDXL outputs are strongly favored over those from preceding models, such as Stable Diffusion 1.5 and Stable Diffusion 2. In controlled evaluations, the SDXL base and refiner ensemble achieved the highest preference win rate among surveyed models, as shown in published research.

User preference chart for SDXL models

Figure 6. User preference bar chart showing higher win rates for SDXL over previous models.

While traditional quantitative metrics such as Fréchet Inception Distance (FID) and CLIP score offer benchmarks, studies reveal these may not match human perceptions of image complexity, compositionality, and text interpretation for foundational text-to-image models. For example, SDXL’s improvements in realism and prompt adherence may not be fully captured by FID or CLIP alone as noted in published research.

The model is distinguished by several technical enhancements:

  • It requires less verbose or prescriptive prompts for detailed outputs, distinguishing between nuanced terms and concepts.
  • It handles complex spatial arrangements and difficult tasks such as generating hands, legible text, or intricate foreground-background compositions with greater reliability than predecessors.
  • Multi-aspect training provides consistent performance across varied image resolutions and aspect ratios, with explicit conditioning on both image size and cropping parameters.

Fine-Tuning, Control, and Use Cases

SDXL is explicitly designed to streamline fine-tuning for custom data and user-specific image styles, reducing the complexity of producing new LoRAs or custom checkpoints. Stability AI has integrated next-generation control tools, such as T2I adaptation and ControlNet extensions, providing more precise manipulation over content and style in outputs.

Applications span artistic creation, concept art, educational illustration, research on generative models, and safe deployment investigations. The model's open-access license under CreativeML OpenRAIL++-M supports broad experimentation and use.

Limitations

Despite improvements, SDXL demonstrates some limitations. The model may encounter difficulties with generating perfectly photorealistic faces, consistent hands, or long segments of legible text. Intricate compositionality—such as complex object arrangements or nuanced interactions—remains challenging and subject to further enhancements. "Concept bleeding," where distinct features may unintentionally overlap, can also occur, often influenced by encoder compression and contrastive training losses.

Additionally, SDXL follows the two-stage approach for optimal outputs, which can require loading two large model checkpoints, presenting accessibility and resource constraints. Like other large-scale image generators, SDXL may inadvertently reinforce or reflect biases present in its training datasets and does not guarantee robust safeguards against all forms of misuse.

Comparison with Previous Stable Diffusion Models

SDXL marks a departure from the earlier Stable Diffusion 1.5 and Stable Diffusion 2 lines by utilizing a much larger UNet backbone, dual text encoders, and a two-stage generation pipeline. Its outputs are consistently preferred in user studies, including in scenarios testing prompt adherence and compositional capabilities.

Additional models in the family, such as the dedicated SDXL refiner, are specialized for enhancing fidelity in difficult areas—particularly backgrounds and facial details—demonstrating the modularity and flexibility of the SDXL ecosystem.

Release, Licensing, and Resources

SDXL 1.0 was officially launched as an open model on July 26, 2023, with the scientific preprint made available on arXiv earlier that month. The model, its codebase, and refined weights are provided under the CreativeML OpenRAIL++-M License, emphasizing responsible and transparent deployment.

Developers and researchers can access the SDXL model, code, and documentation through GitHub and Hugging Face. Optimized support is available for frameworks such as Hugging Face Diffusers, Optimum, OpenVINO, and ONNX Runtime.

Helpful Links

About Stable Diffusion XL: The SDXL family of AI models represents a significant technological advancement in text-to-image generation, featuring a substantial increase in parameters—3.5 billion for the base model and 6.6 billion for the ensemble—alongside a dual-stage architecture that includes a base model and a refiner, enabling the creation of high-resolution (1024x1024) images with enhanced detail, color accuracy, and style versatility.

More in the Stable Diffusion XL Family

stabilityai /

SDXL Turbo

SDXL variant using the Adversarial Diffusion Distillation (ADD) technique to generate images very quickly, only requiring 2-6 steps instead of 20-60.
ByteDance /

SDXL Lightning

SDXL variant using the Adversarial Diffusion Distillation (ADD) technique to generate images very quickly, with multiple variants for different numbers of steps (1-8) and a more permissive license than SDXL Turbo.
dataautogpt3 /

OpenDalle

SDXL model focused on prompt adherence and semantic understanding, with a stated aim of achieving Dalle-3 level understanding of prompts.
Yamer /

Yamer's Realistic

SDXL fine-tune capable of generating realistic images of people and landscapes.
albedobond /

AlbedoBase XL

SDXL fine-tune resulting from merging 300+ top community models, strong performance across a wide range of image types.
KandooAI /

Juggernaut XL

A popular versatile model finetuned on SDXL by KandooAI and RunDiffusion. This version features improved prompt adherence due to an innovative GPT-4 captioning system built by LEOSAM.
SG_161222 /

Realistic Vision XL

SDXL fine-tune optimizing for generating photorealistic people, animals, and landscapes. In addition to training, this model is a merge of over 10 other SDXL models aimed at realism.
ALIENHAZE /

New Reality XL

Merge of multiple SDXL checkpoints and LoRAs, with impressive breadth and consistency in generating photorealistic images.
razzz /

Realism Engine SDXL

SDXL checkpoint optimized for photorealistic generation of a wide range of humans.
CagliostroLab /

Animagine XL

SDXL fine-tune with very strong performance in genearating anime images.
SoCalGuitarist /

Nightvision XL

Photography-focused SDXL checkpoint with strong prompt adherence and versatile output.
Lykon /

Dreamshaper XL

Fine-Tuned on SDXL, this is a general purpose model designed for photos, art, anime, and manga. This Lightning version can generate quality images in few steps.
PurpleSmartAI /

Pony Diffusion V6 XL

A fine-tuned Stable Diffusion XL model trained on 2.6 million images for generating cartoon, anime, and anthropomorphic character art.
diffusers /

ControlNet SDXL Diffusers Canny

SDXL ControlNet model for edge detection.
stabilityai /

ControlNet SDXL Canny

Smaller SDXL ControlNet model for edge detection.
diffusers /

ControlNet SDXL Diffusers Depth

SDXL ControlNet model for depth generation.
stabilityai /

ControlNet SDXL Depth

Smaller SDXL ControlNet model for depth generation.
stabilityai /

ControlNet SDXL Recolor

SDXL ControlNet model for recoloring images.
h94 /

ControlNet SDXL IP Adapter

SDXL ControlNet model for conditioning on an image prompt.
thibaud /

ControlNet SDXL Open Pose

SDXL ControlNet model for copying human poses.

More from stabilityai

stabilityai /

Stable Video Diffusion

A latent diffusion model that generates short video clips up to 25 frames from single images using temporal convolution and attention layers.
stabilityai /

Stable Video Diffusion XT

A video generation model that creates coherent sequences from static images or text prompts using latent diffusion architecture.
stabilityai /

Stable Video Diffusion XT 1.1

Video generation model that transforms single images into 25-frame sequences at 1024x576 resolution with controllable motion and camera parameters.
stabilityai /

Stable Video 3D

Stable Video 3D (SV3D) is a generative model based on Stable Video Diffusion that takes in a still image of an object as a conditioning frame, and generates an orbital video of that object.
stabilityai /

Stable Video 4D

A generative video-to-video diffusion model that synthesizes temporally and spatially consistent multi-view video sequences from single input videos.
stabilityai /

Stable Fast 3D

Generates textured 3D meshes with material properties from single images in approximately 0.5 seconds using a transformer-based architecture.
stabilityai /

Stable Diffusion 2

A text-to-image diffusion model offering 768×768 resolution generation with depth conditioning, inpainting capabilities, and 4x upscaling functionality.
stabilityai /

Stable Diffusion 1.1

A latent text-to-image diffusion model trained on LAION datasets that generates 512×512 images from natural language prompts using compressed latent space processing.
stabilityai /

Stable Diffusion 1.5

Text-to-image diffusion model trained on LAION dataset subset, generating 512x512 images from natural language prompts using latent space processing.
stabilityai /

Stable Diffusion 3.5 Large

This 8-billion parameter model brings improvements to SD3 in customizability, efficiency, and diversity. This Large variant was designed for professional use cases at 1 megapixel resolution.
stabilityai /

Stable Diffusion 3.5 Turbo

This latest iteration in the Stable diffusion family brings improvements over SD3 in customizability, efficient performance, and diverse outputs. The Turbo variant is distilled from the Large version to generate images in just 4 steps.
stabilityai /

Stable Cascade Stage A

A vector quantized GAN encoder that compresses 1024×1024 images to 256×256 discrete tokens as part of a three-stage hierarchical text-to-image pipeline.
stabilityai /

Stable Cascade Stage B

Intermediate latent super-resolution module that upscales compressed text-conditional representations from Stage C to enable high-fidelity image generation.
stabilityai /

Stable Cascade Stage C

Text-to-image diffusion model using three-stage cascaded architecture with 42:1 spatial compression for efficient high-resolution synthesis.
stabilityai /

Stable Audio Open 1.0

Open-source text-to-audio synthesis model with 1.21 billion parameters, trained exclusively on Creative Commons data using latent diffusion architecture.