sglang-diffusion-performance

Benchmark SGLang and Diffusers backends to optimize diffusion performance on multi-GPU setups.

Updated Jun 29, 2026
One-click install
npx skills add https://github.com/hey-kong/sglang --skill sglang-diffusion-performance-hey-kong
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sglang-diffusion-performance
Source: https://github.com/hey-kong/sglang/tree/main/python/sglang/multimodal_gen/.claude/skills/sglang-diffusion-performance
Command: npx skills add https://github.com/hey-kong/sglang --skill sglang-diffusion-performance-hey-kong

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill guides you to identify and optimize the fastest SGLang Diffusion configuration for a given model, GPU, and VRAM budget.

Core Features & Use Cases

  • Benchmark and compare native SGLang vs Diffusers backends, with lossless and lossy optimization paths, to maximize throughput on multi-GPU setups.
  • Profile and tune combinations of flags (e.g., --enable-torch-compile, --warmup, offloads) to meet VRAM constraints while preserving acceptable quality.
  • Use Case: You need to run a diffusion model on Wan2.2 IV with 8 GPUs and want the lowest latency within a fixed VRAM cap.

Quick Start

Run the diffusion benchmark workflow to identify the fastest native SGLang performance flags for your model and hardware.

Frequently Asked Questions about sglang-diffusion-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize SGLang diffusion performance for a specific GPU and VRAM budget?

To optimize SGLang diffusion performance, run the benchmark workflow to profile combinations of performance flags like --enable-torch-compile and offloads. This identifies the fastest configuration that meets your VRAM constraints while preserving acceptable generation quality.

What is the difference between native SGLang and Diffusers backends for diffusion benchmarking?

Diffusion benchmarking compares native SGLang and Diffusers backends to evaluate lossless and lossy optimization paths. This comparison identifies the maximum throughput configuration for your specific model and multi-GPU setup.

Can I tune diffusion model latency across multi-GPU setups using torch compile and warmup flags?

Yes, you can tune diffusion latency across multi-GPU setups by profiling flag combinations such as --enable-torch-compile and --warmup. The benchmark workflow tests these flags to find the lowest latency within your fixed VRAM cap.

Does the SGLang diffusion benchmark support offloading to fit VRAM constraints?

Yes, the SGLang diffusion benchmark supports offloads to fit VRAM constraints. You can profile and tune offloading configurations alongside other performance flags to maximize throughput without exceeding your available VRAM budget.

What's the best way to benchmark Wan2.2 IV diffusion models on 8 GPUs?

The best way to benchmark Wan2.2 IV on 8 GPUs is applying the SGLang diffusion benchmark workflow to profile performance flags. This process identifies the fastest configuration achieving the lowest latency within your specific hardware and VRAM limits.

Why does my diffusion model exceed VRAM limits when enabling torch compile?

Enabling torch compile can increase memory usage, causing VRAM limits to be exceeded. You can resolve this by profiling offload configurations and warmup flags through the benchmark workflow to meet your VRAM constraints.