---
title: "stable-diffusion-xl"
publisher: "stabilityai"
type: "endpoint"
updated: "2025-07-20T16:35:24.799Z"
description: "Generate images and stunning visuals with realistic aesthetics."
canonical: "https://build.nvidia.com/stabilityai/stable-diffusion-xl"
---

# Model Overview

## Description:

SDXL is a latent diffusion model for text-to-image synthesis. Compared to previous versions of Stable Diffusion, SDXL leverages a three times larger UNet backbone: The increase of model parameters is mainly due to more attention blocks and a larger cross-attention context as SDXL uses a second text encoder.

## Model Card

[Stable Diffusion XL 1.0 TensorRT Model Card](https://huggingface.co/stabilityai/stable-diffusion-xl-1.0-tensorrt)  
[Stable Diffusion XL 1.0 Base Model Card](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0)  
[Stable Diffusion XL 1.0 Refiner Model Card](https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0)

## Terms of use

By accessing this model, you are agreeing to the SDXL 1.0 terms and conditions of the [license](https://github.com/Stability-AI/generative-models/blob/main/model_licenses/LICENSE-SDXL1.0), [acceptable use policy](https://github.com/Stability-AI/stablediffusion/blob/main/LICENSE) and [stability.ai privacy policy](https://platform.stability.ai/legal/privacy-policy)

## Third-Party Community Consideration:
This model is not owned or developed by NVIDIA. This model has been developed and built to a third-party’s requirements for this application and use case; see [Stability-AI's SDXL Model Card](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0).

## References(s):

* [SDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesis](https://arxiv.org/abs/2307.01952) paper <br>
* [Stability-AI](https://github.com/Stability-AI/generative-models) repo <br>

## Model Architecture: 
**Architecture Type:** Transformer and Convolutional Neural Network (CNN) <br>
**Network Architecture:** UNet + attention blocks <br>
**Model Version:** SDXL 1.0 <br>

## Input:
**Input Format:** Text <br>
**Input Parameters:** scheduler type, denoising steps, classifier-free guidance <br>

## Output:
**Output Format:** Red, Green, Blue (RGB) Image <br>
**Output Parameters:** 2D <br>

## Software Integration:
**Supported Hardware Platform(s):** Hopper, Ampere/Turing <br>
**Supported Operating System(s):** Linux <br>

# Inference:
**Engine:** [Triton](https://developer.nvidia.com/triton-inference-server) <br>
**Test Hardware:** H100 <br>

# Ethical Considerations
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse. Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).

## Prototype

```bash
invoke_url='https://ai.api.nvidia.com/v1/genai/stabilityai/stable-diffusion-xl'

authorization_header="Authorization: Bearer $NVIDIA_API_KEY"
accept_header='Accept: application/json'
content_type_header='Content-Type: application/json'

data='{
"text_prompts": [
{
"text": "",
"weight": 1
},
{
"text":  "" ,
"weight": -1
}
],
"cfg_scale": ,
"sampler": "",
"seed": ,
"steps": 
}'

response=$(curl --silent -i -w "\n%{http_code}" --request POST \
--url "$invoke_url" \
--header "$authorization_header" \
--header "$accept_header" \
--header "$content_type_header" \
--data "$data"
)

http_code=$(echo "$response" | tail -n 1)

echo "$response" | awk '/{/,EOF-1'
```

```javascript
import fetch from "node-fetch";

const invokeUrl = "https://ai.api.nvidia.com/v1/genai/stabilityai/stable-diffusion-xl"

const headers = {
"Authorization": "Bearer $NVIDIA_API_KEY",
"Accept": "application/json",
}

const payload = {
"text_prompts": [
{
"text": "",
"weight": 1
},
{
"text":  "" ,
"weight": -1
}
],
"cfg_scale": ,
"sampler": "",
"seed": ,
"steps": 
}

let response = await fetch(invokeUrl, {
method: "post",
body: JSON.stringify(payload),
headers: { "Content-Type": "application/json", ...headers }
});

if (response.status != 200) {
let errBody = await (await response.blob()).text()
throw "invocation failed with status " + response.status + " " + errBody
}
let response_body = await response.json()
console.log(JSON.stringify(response_body))
```

```python
import requests

invoke_url = "https://ai.api.nvidia.com/v1/genai/stabilityai/stable-diffusion-xl"

headers = {
"Authorization": "Bearer $NVIDIA_API_KEY",
"Accept": "application/json",
}

payload = {
"text_prompts": [
{
"text": "",
"weight": 1
},
{
"text":  "" ,
"weight": -1
}
],
"cfg_scale": ,
"sampler": "",
"seed": ,
"steps": 
}

response = requests.post(invoke_url, headers=headers, json=payload)

response.raise_for_status()
response_body = response.json()
print(response_body)
```