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.
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-ditRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install sglang-diffusion-cache-dit in Claude Code
git clone --depth 1 https://github.com/sgl-project/sglang /tmp/sglang && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/sglang/python/sglang/multimodal_gen/.agents/skills/sglang-diffusion-cache-dit ~/.gemini/antigravity-cli/skills/sglang-diffusion-cache-ditAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install sglang-diffusion-cache-dit in Antigravity CLI
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
ANo 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 →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
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.
