Skip to main content
fireworks /

Stable Diffusion 3.5 Medium

ServerlessImage

Stable Diffusion 3.5 Medium is a Multimodal Diffusion Transformer (MMDiT) text-to-image model with Adversarial Diffusion Distillation (ADD) that features improved performance in image quality, typography, complex prompt understanding, and resource-efficiency, with a focus on fewer inference steps. Powered By Stability AI. Stable Diffusion 3.5 Medium is deployed as a Flumina app. See for more details: https://huggingface.co/fireworks-ai/stable-diffusion-3.5-medium-flumina

Serverless API

Stable Diffusion 3.5 Medium is available via Fireworks' serverless image API, where you pay per image step (per generated image) and do not need to configure GPUs.

The Fireworks image generation API can be called by making HTTP requests from any language. See the below API examples to see how to call it. Also check out the Flumina repo linked above for full API details and to see the implementation code.

Try it

Text to Image

Generate an image response for the given prompt.

import requests

url = "https://api.fireworks.ai/inference/v1/workflows/accounts/fireworks/models/stable-diffusion-3p5-medium/text_to_image"
headers = {
    "Content-Type": "application/json",
    "Accept": "image/jpeg",
    "Authorization": "Bearer $API_KEY",
}
data = {
    "prompt": "",
    "aspect_ratio": "16:9",
    "guidance_scale": 4.5,
    "num_inference_steps": 28
}

response = requests.post(url, headers=headers, json=data)

if response.status_code == 200:
    with open("output.jpg", "wb") as f:
        f.write(response.content)
    print("Image saved as output.jpg")
else:
    print("Error:", response.status_code, response.text)

On-demand deployments

On-demand deployments allow you to use Stable Diffusion 3.5 Medium on dedicated GPUs with Fireworks' high-performance serving stack with high reliability and no rate limits.

See the On-demand deployments guide for details.

Deploy this model