Skip to main content
You can install SGLang Diffusion using one of the methods below.

Standard installation (NVIDIA GPUs)

Platform: NVIDIA GPUs (CUDA)
Use uv for faster installation:
pip install --upgrade pip
pip install uv
uv pip install "sglang[diffusion]" --prerelease=allow

Platform-specific installs

Use the tab that matches your accelerator.
Platform: AMD Instinct GPUs (ROCm)For AMD Instinct GPUs (for example, MI300X), use the ROCm-enabled Docker image:
docker run --device=/dev/kfd --device=/dev/dri --ipc=host \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  --env HF_TOKEN=<secret> \
  lmsysorg/sglang:v0.5.9-rocm700-mi30x \
  sglang generate --model-path black-forest-labs/FLUX.1-dev --prompt "A logo With Bold Large text: SGL Diffusion" --save-output
For detailed ROCm system configuration and installation from source, see AMD GPUs.