sglang-diffusion-modelopt-quant

Quantize diffusion DiT models with ModelOpt to FP8 or NVFP4 checkpoints for SGLang Diffusion.

Updated May 30, 2026
One-click install
npx skills add https://github.com/QingHuan-6/SglangGen --skill sglang-diffusion-modelopt-quant-qinghuan-6
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sglang-diffusion-modelopt-quant
Source: https://github.com/QingHuan-6/SglangGen/tree/main/python/sglang/multimodal_gen/.claude/skills/sglang-diffusion-modelopt-quant
Command: npx skills add https://github.com/QingHuan-6/SglangGen --skill sglang-diffusion-modelopt-quant-qinghuan-6

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Quantize diffusion DiT models using NVIDIA ModelOpt and make the resulting FP8 or NVFP4 checkpoints loadable, verifiable, and benchmarkable in SGLang Diffusion.

Core Features & Use Cases

  • Quantize diffusion transformers with ModelOpt to generate FP8 and NVFP4 checkpoints suitable for SGLang Diffusion.
  • Adapt exported checkpoints to SGLang Diffusion runtime, maintaining compatibility across component paths and validating model quality.
  • Benchmark quantized checkpoints to compare performance, throughput, and fidelity against BF16 baselines.

Quick Start

Quantize a diffusion DiT using NVIDIA ModelOpt, adapt the checkpoint for SGLang Diffusion, and run a basic validation and benchmark pass.

Frequently Asked Questions about sglang-diffusion-modelopt-quant

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

FAQPage Schema
How do I quantize a diffusion DiT model to FP8 or NVFP4 for SGLang Diffusion?

To quantize a diffusion DiT model for SGLang Diffusion, you use ModelOpt to produce FP8 or NVFP4 checkpoints and adapt the component paths for loader compatibility. This workflow relies on ModelOpt's quantize.py as the PTQ source of truth.

Can I validate quantized FP8 diffusion checkpoints against a BF16 baseline?

Yes, you can validate quantized FP8 diffusion checkpoints against a BF16 baseline. The quantization workflow includes validation guidance to verify model quality and ensure fidelity before deployment.

Does ModelOpt quantization support multi-transformer setups for diffusion models?

Yes, ModelOpt quantization supports multi-transformer setups for diffusion models. The workflow applies ModelOpt-based quantization across FP8 and NVFP4 configurations while preserving a generic workflow with isolated fallbacks.

How do I benchmark quantized diffusion checkpoints to compare throughput and fidelity?

You benchmark quantized diffusion checkpoints by comparing their performance and throughput against BF16 baselines. The workflow provides guidance for benchmarking to measure fidelity and runtime metrics after adapting checkpoints.

What is the best way to adapt exported ModelOpt checkpoints for SGLang Diffusion runtime?

The best way to adapt exported ModelOpt checkpoints is to adjust component paths to maintain SGLang Diffusion runtime compatibility. This ensures the FP8 or NVFP4 checkpoints are loadable and verifiable within the runtime environment.