diffusion-optimal-perf

Optimize diffusion model inference with lossless and lossy techniques in SGLang-Diffusion.

105|9|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/guqiong96/Lsglang --skill diffusion-optimal-perf-guqiong96
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diffusion-optimal-perf
Source: https://github.com/guqiong96/Lsglang/tree/main/python/sglang/multimodal_gen/.claude/skills/diffusion-optimal-perf
Command: npx skills add https://github.com/guqiong96/Lsglang --skill diffusion-optimal-perf-guqiong96

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the need to significantly accelerate diffusion model inference, reduce latency, and optimize VRAM usage for production environments.

Core Features & Use Cases

  • Lossless Optimizations: Achieve speedups without compromising output quality using techniques like torch.compile, warmup, and efficient parallelization.
  • Lossy Optimizations: Trade-off minor quality degradation for substantial speed or VRAM gains via approximate attention, quantization, and reduced inference steps.
  • Use Case: A user wants to generate high-resolution images faster and with lower VRAM consumption. This Skill provides the exact commands and configurations to achieve this, balancing speed and quality based on their specific needs.

Quick Start

Use the diffusion-optimal-perf skill to achieve maximum speed for a video model using multiple GPUs with lossless optimizations.

Frequently Asked Questions about diffusion-optimal-perf

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

FAQPage Schema
How do I optimize diffusion model inference for lower latency and VRAM usage?

Optimize diffusion model inference by applying lossless techniques like torch.compile and parallelization, or lossy methods like quantization and approximate attention to reduce VRAM usage and latency.

What's the best way to speed up high-resolution image generation in SGLang-Diffusion?

Speed up high-resolution image generation in SGLang-Diffusion by configuring specific CLI flags and environment variables to balance throughput, speed, and output quality.

Does SGLang-Diffusion support lossless speedup for video models on multiple GPUs?

Yes, SGLang-Diffusion supports lossless speedup for video models on multiple GPUs by utilizing warmup, efficient parallelization, and torch.compile to maximize throughput.

What is the difference between lossless and lossy diffusion model performance optimization?

Lossless optimization achieves speedups without compromising output quality, while lossy optimization trades minor quality degradation for substantial speed or VRAM reductions using quantization.

Can I reduce inference steps to improve diffusion model throughput without breaking production deployment?

Yes, reducing inference steps is a lossy optimization technique that improves throughput and lowers latency for production deployment, accepting minor quality degradation in exchange for speed.

Why does diffusion model deployment require approximate attention and quantization?

Diffusion model deployment requires approximate attention and quantization to achieve substantial VRAM gains and lower latency, addressing high throughput challenges in production environments.