Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

sglang-diffusion-cache-dit

Skill by sgl-project

Guides developers through upgrading and integrating cache-dit in the SGLang diffusion runtime (multimodal_gen). It covers adding cache knobs, porting upstream PRs, running the CLI test matrix and validating precision.

  • Score 94
  • 39k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install sglang-diffusion-cache-dit

Built from the published package, never by AI.

git clone --depth 1 https://github.com/sgl-project/sglang /tmp/sglang && mkdir -p ~/.claude/skills && cp -r /tmp/sglang/python/sglang/multimodal_gen/.agents/skills/sglang-diffusion-cache-dit ~/.claude/skills/sglang-diffusion-cache-dit

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install sglang-diffusion-cache-dit in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This agent skill is a step-by-step workflow for working with cache-dit inside SGLang's multimodal diffusion code. It names the four files on the SGLang side that handle the integration, including the config class, the environment variables and the single injection point for new cache parameters in denoising.py. It describes how request-level overrides take priority over environment variables, and how DMD and TaylorSeer calibrators are kept mutually exclusive.

The skill also covers environment setup in a dedicated conda env, building the cache-dit SVDQuant extension, a nine-case sglang generate CLI test matrix, and precision checks using PSNR and log evidence. It is written for developers who maintain or upgrade the SGLang diffusion cache-dit path. The source says the workflow is not specific to FLUX and asks the user for the model and checkpoint first.

Written from the project's SKILL.md and checked against it.

What it can do

  • Integration mapLists the four SGLang files that handle the cache-dit integration and their responsibilities.
  • Add a cache knobGives six steps to add a new cache parameter, using DMD as the worked example.
  • Upstream PR portingPredicts which files will conflict when porting cache-dit PRs and how to resolve them.
  • Environment setupCovers a dedicated conda env, sglang install and building the cache-dit SVDQuant extension.
  • CLI test matrixDefines a nine-case matrix across SGLD and diffusers backends with DBCache, DMD and SVDQuant.
  • Failure diagnosisSets a fixed order for reading summary logs, finding the first traceback and checking extension status.
  • Precision validationDescribes validating DBCache, DMD and SVDQuant paths with PSNR and log evidence.
  • Environment troubleshootingAddresses wheel ABI mismatches, flashinfer-cubin conflicts and stub-based unit test issues.

What you need

  • Python 3.12 (conda example in the source)
  • A CUDA toolkit with CUDA_HOME set
  • A GPU for running sglang diffusion jobs
  • A local SGLang repository
  • The cache-dit package or repository

Try asking

  • Walk me through adding a new cache-dit knob to SGLang diffusion.
  • Help me port this cache-dit upstream PR and resolve the conflicts.
  • Build a CLI test matrix for DBCache and DMD and check PSNR results.

Good to know

  • The source says to ask for the model name and checkpoint path before starting; it is not FLUX-specific.
  • Test runs are meant to happen only in a dedicated, isolated environment.
  • The reference run used PRO 5000 hardware with FLUX.1-dev at 1024x1024 and 28 steps.
  • The PyPI cache-dit wheel can be ABI-incompatible with newer torch, requiring a source build.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: python/sglang/multimodal_gen/.agents/skills/sglang-diffusion-cache-dit/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md28 KB
  • references/block_adapter.md24 KB

Alternatives to sglang-diffusion-cache-dit

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

sglang-diffusion-cache-dit: common questions

What is cache-dit used for in SGLang diffusion?

The source describes cache-dit as the caching layer for SGLang's multimodal diffusion runtime, covering DBCache, DMD calibrator, TaylorSeer and SVDQuant DQ paths.

How are cache settings chosen per request?

Request overrides in sampling_params.cache_dit_params take priority over environment variables. A secondary knob first inherits the primary request value, then falls back to SGLANG_CACHE_DIT_SECONDARY_* variables.

Can DMD and TaylorSeer be enabled together?

No. The source says the calibrator is a single slot, so DMD and TaylorSeer are mutually exclusive and enabling both raises a ValueError.

How do I install sglang-diffusion-cache-dit?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is sglang-diffusion-cache-dit free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is sglang-diffusion-cache-dit safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to sglang-diffusion-cache-dit?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

sglang-diffusion-cache-dit Install

Add to stack

Loading.