sglang-diffusion-performance

Select SGLang Diffusion configuration flags for generation speed and GPU memory usage.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps select SGLang Diffusion settings that minimize generation latency or GPU memory usage for a specific model, hardware configuration, and quality target.

Core Features & Use Cases

  • Performance Tuning: Choose lossless and lossy optimization flags for image and video diffusion workloads.
  • Hardware-Aware Configuration: Match multi-GPU parallelism, CPU offload, layerwise offload, precision, and attention backends to available GPUs and VRAM.
  • Benchmark Guidance: Set up warmup, performance dumps, and comparisons while accounting for model-specific limitations and quality tradeoffs.
  • Use Case: Configure Wan2.2 on an eight-GPU system for maximum throughput, or tune a single-GPU image pipeline to fit within a constrained VRAM budget.

Quick Start

Ask the skill to recommend the fastest SGLang Diffusion command for your model, GPU count, VRAM budget, resolution, and acceptable quality tradeoffs.

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 settings for speed and VRAM usage?

To optimize SGLang diffusion settings, you select configuration flags that balance generation latency and GPU memory usage for your specific model and hardware setup. This involves tuning multi-GPU parallelism, precision, and attention backends.

What is the best way to configure multi-GPU parallelism for diffusion inference?

Configuring multi-GPU parallelism for diffusion inference involves selecting SGLang flags that distribute workloads across available GPUs. The optimal setup matches your specific model requirements and VRAM budget to maximize throughput while maintaining quality targets.

Can I run image generation pipelines on a single GPU with constrained VRAM?

Yes, you can run image generation pipelines on a single GPU with constrained VRAM by using CPU offload or layerwise offload flags in SGLang. These settings help fit large diffusion models within limited memory budgets without requiring additional hardware.

How does CPU offload affect diffusion generation latency in SGLang?

CPU offload in SGLang reduces VRAM usage by transferring diffusion model layers to system memory, which increases generation latency. This approach provides model-aware performance tradeoffs, allowing you to prioritize memory savings over maximum speed when hardware is limited.

Why do I need warmup procedures before benchmarking diffusion performance?

Warmup procedures are needed before benchmarking diffusion performance to ensure stable measurements by initializing caches and compilation paths. SGLang benchmark guidance accounts for model-specific limitations and quality tradeoffs to provide reliable performance comparisons.

What SGLang quantization options work with video diffusion workloads?

SGLang supports lossless and lossy optimization flags, including quantization, for video diffusion workloads. These settings adjust precision and attention backends to reduce memory footprint and increase throughput while accounting for acceptable quality tradeoffs.