sglang-diffusion-modelopt-quant

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enable end-to-end quantization of diffusion DiT models with NVIDIA ModelOpt, producing FP8 or NVFP4 checkpoints that are loadable, verifiable, and benchmarkable in SGLang Diffusion.

Core Features & Use Cases

  • Quantize diffusion transformers using ModelOpt's FP8 or NVFP4 paths.
  • Convert and adapt ModelOpt exports to SGLang Diffusion format.
  • Validate accuracy and benchmark performance of the quantized model.
  • Maintain a clear separation between general converter logic and model-specific branching.

Quick Start

Quantize a diffusion DiT with ModelOpt, convert the exported checkpoint to SGLang Diffusion, and validate its accuracy and speed.

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 using ModelOpt?

To quantize a diffusion DiT model, this Skill applies NVIDIA ModelOpt's FP8 or NVFP4 paths to generate quantized checkpoints, which are then adapted to load cleanly in SGLang Diffusion.

Can I convert ModelOpt exported checkpoints to SGLang Diffusion format directly?

Yes, you can convert ModelOpt exports to SGLang Diffusion format. This Skill adapts the exported checkpoints, maintaining a clear separation between general converter logic and model-specific branching.

Does SGLang Diffusion support mixed BF16 and NVFP4 workflows?

SGLang Diffusion supports mixed BF16 and NVFP4 workflows. This Skill enables end-to-end quantization pipelines, including per-component workflows that preserve provenance and provide validated performance metrics.

How do I validate accuracy and benchmark performance of a quantized diffusion model?

To validate accuracy and benchmark performance of a quantized diffusion model, this Skill provides compatibility checks and validated performance metrics across ModelOpt exports and SGLang runtimes.

What is the best way to use ModelOpt's quantize.py for SGLang runtime compatibility?

Using ModelOpt's quantize.py for SGLang runtime compatibility involves applying the quantization script, adapting outputs to SGLang Diffusion format, and validating the resulting checkpoints for clean loading.

Why do I need format conversion after quantizing a diffusion transformer?

Format conversion is needed after quantizing a diffusion transformer because ModelOpt exports must be adapted to the SGLang Diffusion format to ensure the checkpoints load cleanly and verifiably in the target runtime.