skills/vllm-omni-perf/SKILL.md
Optimize vLLM-Omni performance through benchmarking, TeaCache, Cache-DiT, quantization, CPU offloading, and parallelism tuning. Use when improving inference speed, reducing latency, lowering memory usage, running benchmarks, or enabling diffusion acceleration.
npx skillsauth add hsliuustc0106/vllm-omni-skills vllm-omni-perfInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
vLLM-Omni provides multiple optimization levers for both autoregressive and diffusion pipelines. Key techniques include KV cache optimization (inherited from vLLM), TeaCache/Cache-DiT for diffusion acceleration, quantization, CPU offloading, and parallelism configuration.
| Technique | Applies To | Speedup | Quality Impact | |-----------|-----------|---------|----------------| | TeaCache | Diffusion models | 1.5-2.0x | Minimal | | Cache-DiT | Diffusion models | 1.3-1.8x | Minimal | | Quantization | All models | 1.2-1.5x | Slight | | Tensor Parallelism | All models | Near-linear | None | | Sequence Parallelism | DiT models | Near-linear | None | | CPU Offloading | All models | Enables larger models | Adds latency | | GPU Memory Tuning | All models | More throughput | None | | Multi-Thread Weight Loading | Diffusion models | Faster startup | None |
TeaCache provides adaptive caching for diffusion transformer denoising steps, skipping redundant computations:
vllm serve <model> --omni \
--enable-teacache \
--teacache-threshold 0.1
| Parameter | Description | Default |
|-----------|-------------|---------|
| --enable-teacache | Enable TeaCache | Disabled |
| --teacache-threshold | Cache hit threshold (lower = more caching) | Model-specific |
Recommended thresholds by model:
Alternative diffusion acceleration backend:
vllm serve <model> --omni --enable-cache-dit
Can be combined with TeaCache, but test independently first to measure impact.
Supported models: FLUX.2-dev, Helios-Distilled, Wan2.2, and others using ForwardPattern.Pattern_2. Helios achieves ~20% speedup with cache-dit.
TeaCache and CPU Offload hooks are compatible — use them simultaneously with --enable-teacache --enable-cpu-offload (or --cpu-offload-gb). The HookRegistry sorts hooks alphabetically and ensures the forward-overriding hook (TeaCache) runs last in the pre-process chain. Only one forward-overriding hook is allowed at a time.
For full quantization guidance (method selection, AWQ/GPTQ workflows, FP8 KV cache, quality verification), see the dedicated vllm-omni-quantization skill.
Diffusion models (Qwen-Image, Wan2.2, FLUX, HunyuanImage3.0, etc.) load safetensors shards in parallel using a thread pool instead of sequentially. This is enabled by default and significantly reduces cold-start time:
No configuration needed -- this is automatic for all diffusion models using safetensors format.
Offload model layers to CPU RAM to fit larger models:
vllm serve <model> --omni --cpu-offload-gb 10
Offloads approximately 10 GB of model weights to CPU. Adds latency for offloaded layers.
For diffusion models, layer-wise offloading moves individual transformer layers to CPU between forward passes:
vllm serve <model> --omni --enable-layerwise-cpu-offload
When multiple DiT transformers exist in a pipeline (e.g., Wan2.2-T2V's transformer + transformer-2), the sequential offloader applies mutual exclusion: only one DiT is loaded on GPU at a time, and all others are offloaded to CPU along with encoders. This prevents OOM on memory-constrained GPUs (64 GB).
Maximize throughput by tuning GPU memory allocation:
# Default: 90% of GPU memory
vllm serve <model> --omni --gpu-memory-utilization 0.9
# Conservative: 80% (leaves room for other processes)
vllm serve <model> --omni --gpu-memory-utilization 0.8
# Aggressive: 95%
vllm serve <model> --omni --gpu-memory-utilization 0.95
python -m vllm_omni.benchmarks.benchmark_serving \
--model Tongyi-MAI/Z-Image-Turbo \
--num-prompts 100 \
--port 8091
Time a single request:
time curl -s http://localhost:8091/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"messages": [{"role": "user", "content": "a red circle"}],
"extra_body": {"height": 512, "width": 512, "num_inference_steps": 20}
}' > /dev/null
# GPU utilization
watch -n 1 nvidia-smi
# Server metrics
curl http://localhost:8091/metrics
--gpu-memory-utilization to maximize without OOMNo speedup with TeaCache: Threshold may be too conservative. Lower it gradually (e.g., 0.05) and check quality.
OOM after optimization: Quantization reduces memory. Combine with lower gpu-memory-utilization.
Latency regression with TP: For small models, the communication overhead of tensor parallelism may exceed the compute savings. Use TP only for models that saturate a single GPU.
development
Use before submitting a PR to vllm-project/vllm-omni — self-check the branch against project conventions, catch dead code, verify accuracy/performance claims, and confirm merge readiness. Use when the user says "pre-check", "self review", "pre-submit check", or "check my PR before I open it."
development
--- name: vllm-omni-test-report description: Two report kinds; **default output is always HTML** unless the user explicitly asks for Markdown (.md). **Release** — `scripts/compose_full_report.py` (**测试结论**, Buildkite metrics, **Test Result** = Common stack + optional `--log-dir-h*` nightly-style summaries + H100/CI block, **Issue tracking** = GitHub `ci-failure` + *local test* in:title, Open bugs); use `--format markdown` only when the user wants .md or `patch_report_*.py`. **Nightly** — `script
testing
Review PRs on vllm-project/vllm-omni by routing to the right domain skills, checking critical evidence, and focusing comments on blocking issues. Use when reviewing pull requests or local branches, triaging review depth, running detailed or default review, or checking tests, benchmarks, and breaking changes in vllm-omni.
data-ai
Generate videos with vLLM-Omni using Wan2.2 and other video generation models. Use when generating videos from text, creating videos from images, configuring video generation parameters, or working with text-to-video or image-to-video models.