{
  "hf_id": "stabilityai/stable-diffusion-3.5-medium",
  "meta": {
    "title": "Stable Diffusion 3.5",
    "slug": "stable-diffusion-3.5",
    "provider": "Stability AI",
    "description": "Stability AI's Stable Diffusion 3.5 text-to-image family (medium 2.5B, large 8.1B, large-turbo) via vLLM-Omni with Cache-DiT acceleration",
    "date_added": "2026-01-03",
    "date_updated": "2026-04-17",
    "tasks": [
      "omni"
    ],
    "related_recipes": [
      "stabilityai/stable-audio-open-1.0"
    ],
    "hardware": {
      "mi300x": "verified",
      "mi325x": "verified",
      "mi355x": "verified"
    }
  },
  "model": {
    "model_id": "stabilityai/stable-diffusion-3.5-medium",
    "min_vllm_version": "0.12.0",
    "architecture": "dense",
    "parameter_count": "2.5B",
    "active_parameters": "2.5B",
    "context_length": 0,
    "base_args": [],
    "base_env": {},
    "install": {
      "pip": {
        "command": "uv venv\nsource .venv/bin/activate\nuv pip install -U vllm --torch-backend auto"
      },
      "docker": {
        "command": "docker pull vllm/vllm-openai:latest"
      },
      "extras": [
        {
          "note": "Pin vllm==0.12.0 for Stable Diffusion 3.5",
          "command": "uv pip install vllm==0.12.0",
          "brand": "NVIDIA"
        },
        {
          "note": "vllm-omni provides the image generation backend",
          "command": "uv pip install git+https://github.com/vllm-project/vllm-omni.git",
          "brand": "NVIDIA"
        },
        {
          "note": "AMD ROCm: install vLLM for ROCm and vLLM-Omni from source",
          "command": "VLLM_OMNI_TARGET_DEVICE=rocm uv pip install git+https://github.com/vllm-project/vllm-omni.git vllm==0.20.0+rocm721 --extra-index-url https://wheels.vllm.ai/rocm/0.20.0/rocm721",
          "brand": "AMD"
        }
      ]
    }
  },
  "omni": {
    "tasks": [
      "t2i"
    ]
  },
  "features": {},
  "opt_in_features": [],
  "variants": {
    "default": {
      "precision": "bf16",
      "vram_minimum_gb": 44,
      "description": "Stable Diffusion 3.5 medium (2.5B)"
    },
    "large": {
      "model_id": "stabilityai/stable-diffusion-3.5-large",
      "precision": "bf16",
      "vram_minimum_gb": 24,
      "description": "Stable Diffusion 3.5 large (8.1B)"
    },
    "large_turbo": {
      "model_id": "stabilityai/stable-diffusion-3.5-large-turbo",
      "precision": "bf16",
      "vram_minimum_gb": 24,
      "description": "Stable Diffusion 3.5 large-turbo (8.1B, timestep-distilled for few-step inference)"
    }
  },
  "hardware_overrides": {
    "amd": {
      "extra_args": [],
      "extra_env": {
        "VLLM_OMNI_TARGET_DEVICE": "rocm"
      }
    }
  },
  "guide": "## Overview\n\nStable Diffusion 3.5 text-to-image generation models, served via **vLLM-Omni** with\noptional **Cache-DiT** acceleration.\n\nSupported variants:\n- `stabilityai/stable-diffusion-3.5-medium` — 2.5B params\n- `stabilityai/stable-diffusion-3.5-large` — 8.1B params\n- `stabilityai/stable-diffusion-3.5-large-turbo` — 8.1B params (timestep-distilled for few-step inference)\n\n## Prerequisites\n\n- vLLM-Omni on top of vLLM 0.12.0\n- `diffusers` library\n\n## Installation\n\n```bash\nuv venv\nsource .venv/bin/activate\nuv pip install vllm==0.12.0\nuv pip install git+https://github.com/vllm-project/vllm-omni.git\n```\n\n### AMD ROCm (MI300X, MI325X, MI355X)\n\n> **Note:** The vLLM wheel for ROCm requires Python 3.12, ROCm 7.2.1, and glibc >= 2.35.\n> If your environment does not meet these requirements, please use the Docker-based setup.\n\n```bash\nuv venv --python 3.12\nsource .venv/bin/activate\nVLLM_OMNI_TARGET_DEVICE=rocm uv pip install git+https://github.com/vllm-project/vllm-omni.git vllm==0.20.0+rocm721 --extra-index-url https://wheels.vllm.ai/rocm/0.20.0/rocm721\n```\n\n## Python Usage\n\n```python\nfrom vllm_omni.entrypoints.omni import Omni\n\nomni = Omni(model=\"stabilityai/stable-diffusion-3.5-medium\")\n\nimages = omni.generate(\n    prompt=\"a cat wearing sunglasses, cyberpunk style\",\n    negative_prompt=\"blurry, low quality\",\n    height=1024, width=1024,\n    num_inference_steps=28,\n    guidance_scale=7.5,\n    num_outputs_per_prompt=2,\n)\n```\n\n## CLI Usage\n\n```bash\npython examples/offline_inference/text_to_image/text_to_image.py \\\n  --model stabilityai/stable-diffusion-3.5-medium \\\n  --prompt \"a cat wearing sunglasses, cyberpunk style\" \\\n  --negative-prompt \"blurry, low quality\" \\\n  --height 1024 --width 1024 \\\n  --num-inference-steps 28 \\\n  --guidance-scale 7.5\n```\n\n## Cache-DiT Acceleration\n\nEnable caching for significant speed-ups:\n\n```python\nomni = Omni(\n    model=\"stabilityai/stable-diffusion-3.5-medium\",\n    cache_backend=\"cache_dit\",\n    cache_config={\n        \"Fn_compute_blocks\": 8,\n        \"Bn_compute_blocks\": 0,\n        \"max_warmup_steps\": 4,\n        \"residual_diff_threshold\": 0.12,\n    },\n)\n```\n\n## Key Parameters\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| `height` | 1024 | Image height (multiples of 16) |\n| `width` | 1024 | Image width (multiples of 16) |\n| `num_inference_steps` | 28 | Denoising steps |\n| `guidance_scale` | 1.0 | Classifier-free guidance scale |\n\n## References\n\n- [SD3.5 Medium](https://huggingface.co/stabilityai/stable-diffusion-3.5-medium)\n- [SD3.5 Large](https://huggingface.co/stabilityai/stable-diffusion-3.5-large)\n- [SD3.5 Large Turbo](https://huggingface.co/stabilityai/stable-diffusion-3.5-large-turbo)\n- [Cache-DiT Acceleration](https://github.com/vipshop/cache-dit)\n",
  "source": {
    "source": "vllm-omni",
    "repo": "vllm-project/vllm-omni",
    "ref": "main",
    "sha": "cda4a1ef83b295ba332146a7709e6277725edc9f",
    "path": "recipes/models/stabilityai/stable-diffusion-3.5-medium.yaml",
    "edit_url": "https://github.com/vllm-project/vllm-omni/edit/main/recipes/models/stabilityai/stable-diffusion-3.5-medium.yaml",
    "overlays": []
  }
}