sglang-diffusion-add-model

Integrate new diffusion models into the SLang framework via standard stages.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/annealing-inversion/sglang-kimi-deferral --skill sglang-diffusion-add-model-annealing-inversion
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sglang-diffusion-add-model
Source: https://github.com/annealing-inversion/sglang-kimi-deferral/tree/main/python/sglang/multimodal_gen/.claude/skills/sglang-diffusion-add-model
Command: npx skills add https://github.com/annealing-inversion/sglang-kimi-deferral --skill sglang-diffusion-add-model-annealing-inversion

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides engineers through adding a new diffusion model or Diffusers pipeline to SGLang, ensuring consistent integration with the multimodal_gen framework.

Core Features & Use Cases

  • Hybrid Style (recommended): consolidate model-specific pre-processing into a BeforeDenoisingStage, while reusing standard DenoisingStage and DecodingStage for the remainder of the pipeline.
  • Modular Style: enable composition using existing standard stages (e.g., add_standard_t2i_stages) when the new model aligns with existing pipelines.
  • End-to-end integration workflow: from reference implementation study, through architecture mapping, to pipeline registration and verification of non-noise outputs.

Quick Start

Follow the steps in this skill to add a new diffusion model by providing a reference implementation and model metadata, then run the registry to verify integration.

Frequently Asked Questions about sglang-diffusion-add-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, you must provide a reference implementation, implement model components, create configs, wire pipelines, and register the model. The process requires aligning with SGLang's pipeline architecture and correct weight naming.

What is the difference between Hybrid and Modular integration patterns for Diffusers pipelines in SGLang?

Hybrid integration consolidates model-specific pre-processing into a BeforeDenoisingStage while reusing standard DenoisingStage and DecodingStage. Modular integration enables composition using existing standard stages like add_standard_t2i_stages when the new model aligns with existing pipelines.

Does SGLang support integrating custom pre-processing logic into diffusion pipelines?

Yes, SGLang supports custom pre-processing logic through the Hybrid integration pattern. This pattern allows you to consolidate model-specific pre-processing into a BeforeDenoisingStage before utilizing the standard DenoisingStage for the remainder of the pipeline.

Why does my integrated diffusion model output noise in SGLang?

An integrated diffusion model outputs noise if it lacks conformance to required pipeline stages. You must ensure correct implementation of BeforeDenoisingStage, DenoisingStage, and decoding stages, alongside proper weight naming, to produce valid, non-noise outputs.

What are the required stages for wiring a Diffusers pipeline into SGLang?

Wiring a Diffusers pipeline into SGLang requires conformance to specific stages. You must implement and wire the pipeline through the BeforeDenoisingStage, DenoisingStage, and decoding stages to ensure the pipeline architecture processes inputs correctly and generates valid outputs.