---
title: "stable-diffusion-3-medium"
publisher: "stabilityai"
type: "endpoint"
updated: "2024-11-18T22:07:22.204Z"
description: "Advanced text-to-image model for generating high quality images"
canonical: "https://build.nvidia.com/stabilityai/stable-diffusion-3-medium"
---

# Model Overview

## Note: You need to request the model checkpoint and license from Stability AI

Request the model checkpoint from [Stability AI](https://stability.ai/membership) 

## Description:

Stable Diffusion 3 Medium is Stability AI's text-to-image model  that features greatly improved performance in image quality, typography, complex prompt understanding, and resource-efficiency. Compared to previous versions of Stable Diffusion versions, Stable Diffusion 3 leverages a novel Multimodal Diffusion Transformer (MMDiT) architecture that combines a [diffusion transformer architecture](https://arxiv.org/abs/2212.09748) and [flow matching](https://arxiv.org/abs/2210.02747). We have optimized the model's speed using NVIDIA's TensorRT (TRT), resulting in significant acceleration with no quality loss.

Developed by: Stability AI  
Model type: Generative text-to-image model  

## Model Card

[Stable Diffusion 3 Model Card](https://huggingface.co/stabilityai/stable-diffusion-3-medium)

## Terms of use

By accessing this model, you are agreeing to the Stable Diffusion 3 terms and conditions of the [license](https://huggingface.co/stabilityai/stable-diffusion-3-medium/blob/main/LICENSE.md), [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 Stable Diffusion 3 Medium Model Card](https://huggingface.co/stabilityai/stable-diffusion-3-medium).

## References(s):

* [Scaling Rectified Flow Transformers for High-Resolution Image Synthesis](https://arxiv.org/abs/2307.01952) paper
* [Stability-AI's Stable Diffusion 3 Medium Model Card](https://huggingface.co/stabilityai/stable-diffusion-3-medium) webpage  

## Model Architecture: 
**Architecture Type:** Transformer and Convolutional Neural Network (CNN) <br>
**Network Architecture:** Multimodal Diffusion Transformer <br>
**Model Version:** Stable Diffusion 3 Medium <br>

## Input:
**Input Format:** Text  
**Input Parameters:** steps, classifier-free guidance scale, output image aspect ratio, negative prompt

## Output:
**Output Format:** Red, Green, Blue (RGB) JPEG Image  
**Output Size:** 1024x1024, 768x1344, 1344x768, 1344x768, 1344x768, 1344x768, 1216x832  
**Output Parameters:** 2D

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

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

# 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-3-medium'

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

data='{
"prompt": "",
"cfg_scale": ,
"aspect_ratio": "",
"seed": ,
"steps": ,
"negative_prompt": ""
}'

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-3-medium"

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

const payload = {
"prompt": "",
"cfg_scale": ,
"aspect_ratio": "",
"seed": ,
"steps": ,
"negative_prompt": ""
}

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-3-medium"

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

payload = {
"prompt": "",
"cfg_scale": ,
"aspect_ratio": "",
"seed": ,
"steps": ,
"negative_prompt": ""
}

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

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