# Stable Diffusion 3.5 Medium > Stability AI's 2.5-billion parameter Multimodal Diffusion Transformer with improvements (MMDiT-X) text-to-image model optimized for consumer hardware, featuring improved image quality, typography, and complex prompt understanding ## Quick Reference - Model ID: stable-diffusion-3.5-medium - Creator: Stability AI - Status: active - Family: stable-diffusion-3.5 - Base URL: https://api.lumenfall.ai/openai/v1 ## Specifications - Max Resolution: 1414x1414 - Input Modalities: text - Output Modalities: image - Supported Modes: Text to Image, Image Edit ## API Parameters The compiled parameter schema for this model is available via the API: `GET /v1/models/stable-diffusion-3.5-medium?schema=true`. ### Core Parameters - `prompt` (string) — REQUIRED: Text prompt for image generation. Modes: Text to Image ### Size & Layout - `size` (string): Image dimensions as WxH pixels (e.g. "1024x1024") or aspect ratio (e.g. "16:9"). Modes: Text to Image, Image Edit - `aspect_ratio` (string): Aspect ratio of the output image (e.g. "16:9", "1:1"). Modes: Text to Image, Image Edit - `resolution` (string): Output resolution tier (e.g. "1K", "4K"). Modes: Text to Image, Image Edit ### Media Inputs - `image` (file) — REQUIRED: Input image(s) to edit. Modes: Image Edit ### Output & Format - `response_format` (string): How to return the image. Default: url. Values: url, b64_json. Modes: Text to Image, Image Edit - `output_format` (string): Output image format. Values: png, jpeg, gif, webp, avif. Modes: Text to Image, Image Edit - `output_compression` (integer): Compression level for lossy formats (JPEG, WebP, AVIF). Modes: Text to Image, Image Edit - `n` (integer): Number of images to generate. Default: 1. Modes: Text to Image, Image Edit ## Model Identifiers - Primary Slug: stable-diffusion-3.5-medium ## Tags image-generation, text-to-image, open-weights ## Available Providers ### fal.ai - Config Key: fal/stable-diffusion-3.5-medium - Provider Model ID: fal-ai/stable-diffusion-v35-medium - Pricing: $0.020/megapixel - Source: https://fal.ai/models/fal-ai/stable-diffusion-v35-medium ### Replicate - Config Key: replicate/stable-diffusion-3.5-medium - Provider Model ID: stability-ai/stable-diffusion-3.5-medium - Pricing: $0.035/image - Source: https://replicate.com/stability-ai/stable-diffusion-3.5-medium ## Image Gallery 4 images available for this model. Browse all at https://lumenfall.ai/models/stability-ai/stable-diffusion-3.5-medium/gallery ### Curated Examples - [A wide, cinematic shot of a high-end boutique storefront at dusk. The shop’s elegant glass window...](https://assets.lumenfall.ai/PdC14U4IesDNMZMjYe918yRyR_22400u7I47MF0HMhI/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/b9e1ff4cwn0v7xra3tt5ivurp34j@jpeg) - [A hyper-realistic close-up of an elderly artisan's weathered hands meticulously carving intricate...](https://assets.lumenfall.ai/2CXLUxKwgJ-Pyh70qLhB0rQjCt7r6FxvHkaz2VryEN4/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/2c3p7953w8nru60kak2lec9u5ky1@jpeg) - [A hyper-realistic close-up of an elderly artisan's weathered hands meticulously carving intricate...](https://assets.lumenfall.ai/kSCWBmjDlhphXR4jKdqxouQkNnGA6rhIukLEfqvlLDE/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/okjhz69bv40oo4pb5l2wxvb8r9k1@jpeg) - [A vibrant, hand-painted wooden sign hanging above a cozy bakery that says "FRESH SOURDOUGH DAILY"...](https://assets.lumenfall.ai/fY38eIukldhadAA-Fdnb1F5iwwy0Q2RpxS9wELL-o7k/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/tshhnxujq79karlxpfcmcohj7lbm@jpeg) ## Example Prompt The following prompt was used to generate an example image in our playground: A vibrant, hand-painted wooden sign hanging above a cozy bakery that says "FRESH SOURDOUGH DAILY" in elegant gold script. In the blurred background, a capybara calmly balances a small loaf of bread on its head while walking past the shop window. ## Code Examples ### Text to Image (/v1/images/generations) #### cURL curl -X POST \ https://api.lumenfall.ai/openai/v1/images/generations \ -H "Authorization: Bearer $LUMENFALL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "stable-diffusion-3.5-medium", "prompt": "", "size": "1024x1024" }' # Response: # { "created": 1234567890, "data": [{ "url": "https://...", "revised_prompt": "..." }] } #### JavaScript import OpenAI from 'openai'; const client = new OpenAI({ apiKey: 'YOUR_API_KEY', baseURL: 'https://api.lumenfall.ai/openai/v1' }); const response = await client.images.generate({ model: 'stable-diffusion-3.5-medium', prompt: '', size: '1024x1024' }); // { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } console.log(response.data[0].url); #### Python from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://api.lumenfall.ai/openai/v1" ) response = client.images.generate( model="stable-diffusion-3.5-medium", prompt="", size="1024x1024" ) # { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } print(response.data[0].url) ### Image Edit (/v1/images/edits) #### cURL curl -X POST \ https://api.lumenfall.ai/openai/v1/images/edits \ -H "Authorization: Bearer $LUMENFALL_API_KEY" \ -F "model=stable-diffusion-3.5-medium" \ -F "image=@source.png" \ -F "prompt=Add a starry night sky to this image" \ -F "size=1024x1024" # Response: # { "created": 1234567890, "data": [{ "url": "https://...", "revised_prompt": "..." }] } #### JavaScript import OpenAI from 'openai'; import fs from 'fs'; const client = new OpenAI({ apiKey: 'YOUR_API_KEY', baseURL: 'https://api.lumenfall.ai/openai/v1' }); const response = await client.images.edit({ model: 'stable-diffusion-3.5-medium', image: fs.createReadStream('source.png'), prompt: 'Add a starry night sky to this image', size: '1024x1024' }); // { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } console.log(response.data[0].url); #### Python from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://api.lumenfall.ai/openai/v1" ) response = client.images.edit( model="stable-diffusion-3.5-medium", image=open("source.png", "rb"), prompt="Add a starry night sky to this image", size="1024x1024" ) # { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } print(response.data[0].url) ## About ## Overview Stable Diffusion 3.5 Medium is a 2.5-billion parameter text-to-image model developed by Stability AI. It utilizes the Multimodal Diffusion Transformer with improvements (MMDiT-X) architecture to balance high-quality image generation with hardware efficiency. This model is specifically designed to run on consumer-grade GPUs while maintaining the prompt adherence and visual fidelity of larger models in the SD3.5 family. ## Strengths * **Prompt Adherence:** Excels at interpreting complex, multi-subject prompts and correctly attributing attributes (colors, positions, and styles) to specific objects within a scene. * **Typography Rendering:** Significant improvements in spelling accuracy and font legibility compared to previous iterations like SDXL or SD 1.5. * **Hardware Efficiency:** With 2.5 billion parameters, it occupies a "sweet spot" that allows for fast inference and fine-tuning on standard consumer hardware without requiring enterprise-grade VRAM. * **Anatomical Realism:** Demonstrates improved accuracy in rendering human forms, hands, and faces, reducing the common artifacts associated with earlier diffusion models. ## Limitations * **Compositional Drift:** While improved, extremely long or contradictory prompts can still lead to "concept bleeding," where styles or colors intended for one object merge into another. * **Resolution Constraints:** While capable of generating high-resolution images, it performs most reliably at its native training resolutions; exceeding these without tiled upscaling can lead to repetitive patterns or distorted proportions. * **Photorealism Nuance:** Compared to the "Large" variant of SD 3.5, the Medium model may occasionally lack the same level of fine-grained skin texture or micro-detail in complex lighting environments. ## Technical Background Stable Diffusion 3.5 Medium is built on the MMDiT-X architecture, which uses separate sets of weights for the image and text modalities. This allows the model to process visual and linguistic information in a more integrated fashion than traditional U-Net architectures. The training process focused on streamlining the transformer blocks to ensure the model remains performant on local deployments while benefiting from the scaling laws observed in the larger 8B parameter versions. ## Best For This model is ideal for developers building creative tools, marketing asset generators, or localized image synthesis applications where speed and memory efficiency are prioritized. It is particularly effective for projects requiring embedded text or precise layout control via natural language. Stable Diffusion 3.5 Medium is available for testing and integration through Lumenfall’s unified API and interactive playground, allowing you to compare its performance against other models in the Stable Diffusion family. ## Frequently Asked Questions ### How much does Stable Diffusion 3.5 Medium cost? Stable Diffusion 3.5 Medium starts at $0.02 per image through Lumenfall. Pricing varies by provider. Lumenfall does not add any markup to provider pricing. ### How do I use Stable Diffusion 3.5 Medium via API? You can use Stable Diffusion 3.5 Medium through Lumenfall's OpenAI-compatible API. Send requests to the unified endpoint with model ID "stable-diffusion-3.5-medium". Code examples are available in Python, JavaScript, and cURL. ### Which providers offer Stable Diffusion 3.5 Medium? Stable Diffusion 3.5 Medium is available through fal.ai and Replicate on Lumenfall. Lumenfall automatically routes requests to the best available provider. ### What is the maximum resolution for Stable Diffusion 3.5 Medium? Stable Diffusion 3.5 Medium supports images up to 1414x1414 resolution. ## Links - Model Page: https://lumenfall.ai/models/stability-ai/stable-diffusion-3.5-medium - About: https://lumenfall.ai/models/stability-ai/stable-diffusion-3.5-medium/about - Providers, Pricing & Performance: https://lumenfall.ai/models/stability-ai/stable-diffusion-3.5-medium/providers - API Reference: https://lumenfall.ai/models/stability-ai/stable-diffusion-3.5-medium/api - Benchmarks: https://lumenfall.ai/models/stability-ai/stable-diffusion-3.5-medium/benchmarks - Use Cases: https://lumenfall.ai/models/stability-ai/stable-diffusion-3.5-medium/use-cases - Gallery: https://lumenfall.ai/models/stability-ai/stable-diffusion-3.5-medium/gallery - Playground: https://lumenfall.ai/playground?model=stable-diffusion-3.5-medium - API Documentation: https://docs.lumenfall.ai