add-new-diffusion-model

Guide adding diffusion models to the SGLang framework with pipeline configuration.

3|Updated Jun 18, 2025
One-click install
npx skills add https://github.com/moirai-internal/sglang --skill add-new-diffusion-model-moirai-internal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-new-diffusion-model
Source: https://github.com/moirai-internal/sglang/tree/main/python/sglang/multimodal_gen/.claude/skills/support-new-model
Command: npx skills add https://github.com/moirai-internal/sglang --skill add-new-diffusion-model-moirai-internal

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide and structured process for developers to add support for new diffusion models within the SGLang framework, ensuring seamless integration and efficient operation.

Core Features & Use Cases

  • Model Integration: Step-by-step instructions for incorporating new diffusion models, covering both Hybrid Monolithic and Modular Composition pipeline styles.
  • Configuration & Registration: Guidance on setting up pipeline configurations, model components, and registering new models within the SGLang registry.
  • Testing & Verification: Emphasis on verifying output quality and implementing tests to ensure model correctness and performance.
  • Use Case: A machine learning engineer needs to add a newly released, state-of-the-art diffusion model to SGLang for accelerated inference. This Skill guides them through adapting the model's architecture, defining its pipeline, and integrating it into the SGLang ecosystem.

Quick Start

Follow the step-by-step guide to add a new diffusion model to SGLang.

Frequently Asked Questions about add-new-diffusion-model

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

FAQPage Schema
How do I add a new diffusion model to SGLang?

To add a new diffusion model to SGLang, select a pipeline style, implement model components like DiT and VAE, configure PipelineConfig and SamplingParams, register the model, and verify output quality. The process supports both single-GPU and multi-GPU setups.

What is the difference between Hybrid Monolithic and Modular Composition pipelines in SGLang?

Hybrid Monolithic and Modular Composition are two pipeline styles for diffusion model integration in SGLang. They dictate how model components are structured and executed during inference, allowing developers to choose the best architectural fit for their specific model design.

How do I configure SamplingParams and PipelineConfig for a custom diffusion model?

Configuring PipelineConfig and SamplingParams involves defining the execution pipeline and sampling behavior for your custom diffusion model. This setup is a core step in the integration process, ensuring the model processes inputs and generates outputs correctly within SGLang.

What components do I need to implement when integrating a diffusion model into SGLang?

Integrating a diffusion model requires implementing components such as Diffusion Transformers (DiT), Variational Autoencoders (VAE), and necessary encoders. These elements form the core architecture needed for the model to function within the SGLang framework.

How do I verify output quality after registering a new diffusion model in SGLang?

Verifying output quality involves implementing tests to ensure model correctness and performance after registering the new diffusion model in the SGLang registry. This step is emphasized to guarantee the integrated model meets expected inference standards.