skillfed

cache-dit

Cache-DiT: A PyTorch-native Inference Engine with Cache, Parallelism, Quantization and CPU Offload for DiTs.

cache-dit v1.5.0 646.1K downloads/30d#5,596 on PyPI1,246
License unclear Active released

What it is and what it does

Cache-DiT is a PyTorch inference engine for Diffusion Transformers that wraps the Diffusers library and applies multiple optimization strategies: KV-cache acceleration (DBCache, TaylorSeer, SCM), multi-GPU parallelism (Context, Tensor, 2D/3D hybrid), quantization (including SVDQuant W4A4), and layerwise CPU offloading. It integrates with SGLang Diffusion, vLLM-Omni, TensorRT-LLM, ComfyUI, and other frameworks.

The package is designed to be easy to adopt: a single `cache_dit.enable_cache(pipe)` call on a Diffusers pipeline activates caching, and optional config objects allow fine-grained control over parallelism and quantization. It runs on NVIDIA, AMD, and Ascend GPUs. The library is actively maintained, has no known vulnerabilities, and depends on standard ML packages (torch, diffusers, transformers, pyyaml, packaging).

Use it for:

  • Speed up text-to-image generation pipelines by enabling KV-cache and context parallelism with minimal code changes.
  • Reduce GPU memory footprint and latency on multi-GPU setups using tensor parallelism and hybrid 2D/3D parallelism.
  • Quantize large DiT models to int4 or nvfp4 precision without calibration data using SVDQuant.
  • Offload transformer layers to CPU during inference to fit larger models on limited GPU VRAM.
  • Integrate cache acceleration into existing ComfyUI, SGLang, or vLLM workflows via community plugins.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Cache-DiT accelerates inference for Diffusion Transformers (DiTs) via hybrid caching, parallelism, quantization, and CPU offloading, integrating with the Diffusers library and supporting NVIDIA, AMD, and Ascend hardware.

Yes, with conditions. Cache-DiT is actively maintained, has no known vulnerabilities, and offers genuine performance gains for Diffusion Transformer inference. Install it if you run Diffusers pipelines on GPU and want to reduce latency or memory usage. However, verify the license status before use in proprietary contexts, and test speedup claims on your specific hardware and model architecture.

Install

cache-dit on PyPI

pip

pip install cache-dit

uv

uv add cache-dit

poetry

poetry add cache-dit

Installing cache-dit

Before you install

Low friction: pure Python wheel with no compiled dependencies. Active maintenance (last commit 2026-08-14, 1246 GitHub stars). Requires PyTorch, Diffusers, and related ML libraries already in your environment.

License in practice

License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license before use in proprietary or restricted contexts.

Quickstart

pip install cache-dit
import cache_dit
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained(...).to("cuda")
cache_dit.enable_cache(pipe)  # One-line cache acceleration
output = pipe(...)

Requires Python >=3.10, PyTorch, and a compatible GPU (NVIDIA, AMD, or Ascend). For SVDQuant quantization: CUDA 13.0+, PyTorch 2.11+, Ubuntu 22.04+.

Verify before relying

  • Whether the unclear license permits commercial use or redistribution.
  • Actual speedup gains (9x mentioned in description) under typical production workloads.
  • Compatibility matrix with specific Diffusers versions and DiT architectures.
  • Performance overhead of layerwise CPU offload on systems with limited PCIe bandwidth.

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 5 — packaging, pyyaml, torch, diffusers, transformers
Maintenance actively maintained — 59 days since the last release
Last repo commit
First released
Downloads 646,072/month — #5,596 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cache_dit-1.5.0-py3-none-any.whl

Tags

diffusion transformer inference accelerationdit cache optimizationdiffusers pipeline speeduptensor parallelism quantizationcpu offload gpu inference
diffusion-inferencegpu-optimizationquantization

More Artificial Intelligence packages

Further reading