sglang-diffusion-benchmark-profile

Analyze SGLang diffusion denoise latency and profile bottlenecks via perf dumps.

410|14|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/OpenMOSS/MOSS-VL --skill sglang-diffusion-benchmark-profile-openmoss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sglang-diffusion-benchmark-profile
Source: https://github.com/OpenMOSS/MOSS-VL/tree/main/sglang/python/sglang/multimodal_gen/.claude/skills/sglang-diffusion-benchmark-profile
Command: npx skills add https://github.com/OpenMOSS/MOSS-VL --skill sglang-diffusion-benchmark-profile-openmoss

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires diffusion_skill_env, and includes scripts (resource) components.

What problem does it solve?

This skill provides a structured workflow to benchmark denoise latency and profile diffusion bottlenecks in SGLang, ensuring measurements come from the native backend and enabling consistent comparison across runs.

Core Features & Use Cases

  • Preflight and environment setup to locate the repo root, validate write access, and expose required tokens for gated models.
  • Native-backend guarded benchmarking that collects perf dumps, detailed denoise and end-to-end latency, and peak memory metrics.
  • Quick reference guides and example presets to surface bottlenecks, map hotspots to known fast paths, and hand off confirmed kernel work to specialized optimization skills.

Quick Start

Launch the diffusion benchmark by invoking the bench_diffusion_denoise.py script through the skill to generate a perf dump for a chosen model and compare results.

Frequently Asked Questions about sglang-diffusion-benchmark-profile

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

FAQPage Schema
How do I benchmark diffusion denoise latency in SGLang?

Benchmarking diffusion denoise latency in SGLang requires invoking the bench_diffusion_denoise.py script. This process leverages the native backend to collect detailed denoise latency, end-to-end latency, and peak memory metrics for a chosen model.

What is the best way to profile diffusion bottlenecks before kernel optimization?

The best way to profile diffusion bottlenecks is using this skill to collect perf dumps and rank hotspots. It maps identified hotspots to known fast paths and validates the baseline denoise latency before handing off confirmed kernel work to specialized optimization skills.

Do I need to export HF_TOKEN to benchmark gated models with SGLang?

Yes, you must export HF_TOKEN when benchmarking gated models with SGLang. The skill's preflight helper validates environment setup and exposes required tokens to ensure native-backend guarded benchmarking can securely access the gated model repository.

How does perf-dump collection work for diffusion backends?

Perf-dump collection works by enabling torch.profiler during the benchmark execution of the SGLang diffusion backend. This captures detailed performance traces, allowing you to surface performance bottlenecks and generate consistent comparison data across multiple runs.

Can I use this profiling skill without the SGLang native backend?

No, you cannot use this profiling skill without the SGLang native backend. The skill explicitly requires the native SGLang diffusion backend to ensure measurements come from the intended execution path and to enable accurate perf-dump collection.

Why do I need to run a preflight helper before profiling diffusion performance?

You need to run the preflight helper to locate the SGLang repo root and verify write access before profiling diffusion performance. This ensures the environment is correctly configured for safely generating perf dumps and collecting latency metrics.