cache-dit 0.3.3__py3-none-any.whl → 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cache-dit might be problematic. Click here for more details.
- cache_dit/_version.py +2 -2
- cache_dit/cache_factory/cache_adapters/cache_adapter.py +7 -0
- {cache_dit-0.3.3.dist-info → cache_dit-1.0.0.dist-info}/METADATA +86 -71
- {cache_dit-0.3.3.dist-info → cache_dit-1.0.0.dist-info}/RECORD +8 -8
- {cache_dit-0.3.3.dist-info → cache_dit-1.0.0.dist-info}/WHEEL +0 -0
- {cache_dit-0.3.3.dist-info → cache_dit-1.0.0.dist-info}/entry_points.txt +0 -0
- {cache_dit-0.3.3.dist-info → cache_dit-1.0.0.dist-info}/licenses/LICENSE +0 -0
- {cache_dit-0.3.3.dist-info → cache_dit-1.0.0.dist-info}/top_level.txt +0 -0
cache_dit/_version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.
|
|
32
|
-
__version_tuple__ = version_tuple = (
|
|
31
|
+
__version__ = version = '1.0.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (1, 0, 0)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -334,6 +334,13 @@ class CachedAdapter:
|
|
|
334
334
|
|
|
335
335
|
if getattr(transformer, "_hf_hook", None) is not None:
|
|
336
336
|
_hf_hook = transformer._hf_hook # hooks from accelerate.hooks
|
|
337
|
+
if hasattr(transformer, "_old_forward"):
|
|
338
|
+
logger.warning(
|
|
339
|
+
"_hf_hook is not None, so, we have to re-direct transformer's "
|
|
340
|
+
f"original_forward({id(original_forward)}) to transformer's "
|
|
341
|
+
f"_old_forward({id(transformer._old_forward)})"
|
|
342
|
+
)
|
|
343
|
+
original_forward = transformer._old_forward
|
|
337
344
|
|
|
338
345
|
# TODO: remove group offload hooks the re-apply after cache applied.
|
|
339
346
|
# hooks = _diffusers_hook.hooks.copy(); _diffusers_hook.hooks.clear()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cache_dit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.0
|
|
4
4
|
Summary: A Unified, Flexible and Training-free Cache Acceleration Framework for 🤗Diffusers.
|
|
5
5
|
Author: DefTruth, vipshop.com, etc.
|
|
6
6
|
Maintainer: DefTruth, vipshop.com, etc
|
|
@@ -45,28 +45,34 @@ Dynamic: provides-extra
|
|
|
45
45
|
Dynamic: requires-dist
|
|
46
46
|
Dynamic: requires-python
|
|
47
47
|
|
|
48
|
-
<a href="./README.md">📚English</a> | <a href="./README_CN.md">📚中文阅读</a>
|
|
49
|
-
|
|
50
48
|
<div align="center">
|
|
51
49
|
<img src=https://github.com/vipshop/cache-dit/raw/main/assets/cache-dit-logo.png height="120">
|
|
52
50
|
|
|
53
|
-
<p align="center">
|
|
51
|
+
<p align="center">
|
|
54
52
|
A <b>Unified</b>, Flexible and Training-free <b>Cache Acceleration</b> Framework for <b>🤗Diffusers</b> <br>
|
|
55
53
|
♥️ Cache Acceleration with <b>One-line</b> Code ~ ♥️
|
|
56
54
|
</p>
|
|
57
55
|
<div align='center'>
|
|
56
|
+
<img src="./assets/image-reward-bench.png" width=580px >
|
|
57
|
+
</div>
|
|
58
|
+
<div align='center'>
|
|
59
|
+
<a href="https://huggingface.co/docs/diffusers/main/en/optimization/cache_dit"><img src=https://img.shields.io/badge/🤗Diffusers-ecosystem-yellow.svg ></a>
|
|
58
60
|
<img src=https://img.shields.io/badge/Language-Python-brightgreen.svg >
|
|
59
|
-
<img src=https://img.shields.io/badge/PRs-welcome-
|
|
61
|
+
<img src=https://img.shields.io/badge/PRs-welcome-blue.svg >
|
|
60
62
|
<img src=https://img.shields.io/badge/PyPI-pass-brightgreen.svg >
|
|
61
63
|
<img src=https://static.pepy.tech/badge/cache-dit >
|
|
62
64
|
<img src=https://img.shields.io/github/stars/vipshop/cache-dit.svg?style=dark >
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
</div>
|
|
66
|
+
<div align='center'>
|
|
67
|
+
<a href="./README.md">📚English</a> | <a href="./README_CN.md">📚中文阅读 </a> | <a href="./docs/User_Guide.md#api-documentation"> 📚API Documentation </a> | <a href="https://huggingface.co/docs/diffusers/main/en/optimization/cache_dit">🤗Diffusers' Documentation</a>
|
|
68
|
+
</div>
|
|
69
|
+
<!--
|
|
65
70
|
<p align="center">
|
|
66
71
|
<b><a href="#unified">📚Unified Cache APIs</a></b> | <a href="#forward-pattern-matching">📚Forward Pattern Matching</a> | <a href="./docs/User_Guide.md">📚Automatic Block Adapter</a><br>
|
|
67
72
|
<a href="./docs/User_Guide.md">📚Hybrid Forward Pattern</a> | <a href="#dbcache">📚DBCache</a> | <a href="./docs/User_Guide.md">📚TaylorSeer Calibrator</a> | <a href="./docs/User_Guide.md">📚Cache CFG</a><br>
|
|
68
73
|
<a href="#benchmarks">📚Text2Image DrawBench</a> | <a href="#benchmarks">📚Text2Image Distillation DrawBench</a>
|
|
69
74
|
</p>
|
|
75
|
+
-->
|
|
70
76
|
<p align="center">
|
|
71
77
|
🎉Now, <b>cache-dit</b> covers almost <b>All</b> Diffusers' <b>DiT</b> Pipelines🎉<br>
|
|
72
78
|
🔥<a href="#supported">Qwen-Image</a> | <a href="#supported">FLUX.1</a> | <a href="#supported">Qwen-Image-Lightning</a> | <a href="#supported"> Wan 2.1 </a> | <a href="#supported"> Wan 2.2 </a>🔥<br>
|
|
@@ -177,6 +183,7 @@ Dynamic: requires-python
|
|
|
177
183
|
|
|
178
184
|
## 🔥News
|
|
179
185
|
|
|
186
|
+
- [2025-09-24] 🔥**cache-dit** has now joined the 🤗 Diffusers community ecosystem as the **first** cache acceleration framework for DiTs! Check out the documentation here: **[Diffusers Docs](https://huggingface.co/docs/diffusers/main/en/optimization/cache_dit)**. <a href="https://huggingface.co/docs/diffusers/main/en/optimization/cache_dit"><img src=https://img.shields.io/badge/🤗Diffusers-ecosystem-yellow.svg ></a>
|
|
180
187
|
- [2025-09-10] 🎉Day 1 support [**HunyuanImage-2.1**](https://github.com/Tencent-Hunyuan/HunyuanImage-2.1) with **1.7x↑🎉** speedup! Check this [example](https://github.com/vipshop/cache-dit/blob/main/examples/pipeline/run_hunyuan_image_2.1.py).
|
|
181
188
|
- [2025-09-08] 🔥[**Qwen-Image-Lightning**](https://github.com/vipshop/cache-dit/blob/main/examples/pipeline/run_qwen_image_lightning.py) **7.1/3.5 steps🎉** inference with **[DBCache: F16B16](https://github.com/vipshop/cache-dit)**.
|
|
182
189
|
- [2025-09-03] 🎉[**Wan2.2-MoE**](https://github.com/Wan-Video) **2.4x↑🎉** speedup! Please refer to [run_wan_2.2.py](https://github.com/vipshop/cache-dit/blob/main/examples/pipeline/run_wan_2.2.py) as an example.
|
|
@@ -201,12 +208,12 @@ Dynamic: requires-python
|
|
|
201
208
|
<div id="contents"></div>
|
|
202
209
|
|
|
203
210
|
- [⚙️Installation](#️installation)
|
|
211
|
+
- [🔥Benchmarks](#benchmarks)
|
|
204
212
|
- [🔥Quick Start](#quick-start)
|
|
205
213
|
- [📚Pattern Matching](#forward-pattern-matching)
|
|
206
214
|
- [⚡️Dual Block Cache](#dbcache)
|
|
207
215
|
- [🔥TaylorSeer Calibrator](#taylorseer)
|
|
208
216
|
- [📚Hybrid Cache CFG](#cfg)
|
|
209
|
-
- [🔥Benchmarks](#benchmarks)
|
|
210
217
|
- [🎉User Guide](#user-guide)
|
|
211
218
|
- [©️Citations](#citations)
|
|
212
219
|
|
|
@@ -225,6 +232,72 @@ Or you can install the latest develop version from GitHub:
|
|
|
225
232
|
pip3 install git+https://github.com/vipshop/cache-dit.git
|
|
226
233
|
```
|
|
227
234
|
|
|
235
|
+
## 🔥Benchmarks
|
|
236
|
+
|
|
237
|
+
<div id="benchmarks"></div>
|
|
238
|
+
|
|
239
|
+

|
|
240
|
+
|
|
241
|
+
The comparison between **cache-dit: DBCache** and algorithms such as Δ-DiT, Chipmunk, FORA, DuCa, TaylorSeer and FoCa is as follows. Now, in the comparison with a speedup ratio less than **3x**, cache-dit achieved the best accuracy. Surprisingly, cache-dit: DBCache still works in the extremely few-step distill model. For a complete benchmark, please refer to [📚Benchmarks](https://github.com/vipshop/cache-dit/raw/main/bench/).
|
|
242
|
+
|
|
243
|
+
| Method | TFLOPs(↓) | SpeedUp(↑) | ImageReward(↑) | Clip Score(↑) |
|
|
244
|
+
| --- | --- | --- | --- | --- |
|
|
245
|
+
| [**FLUX.1**-dev]: 50 steps | 3726.87 | 1.00× | 0.9898 | 32.404 |
|
|
246
|
+
| [**FLUX.1**-dev]: 60% steps | 2231.70 | 1.67× | 0.9663 | 32.312 |
|
|
247
|
+
| Δ-DiT(N=2) | 2480.01 | 1.50× | 0.9444 | 32.273 |
|
|
248
|
+
| Δ-DiT(N=3) | 1686.76 | 2.21× | 0.8721 | 32.102 |
|
|
249
|
+
| [**FLUX.1**-dev]: 34% steps | 1264.63 | 3.13× | 0.9453 | 32.114 |
|
|
250
|
+
| Chipmunk | 1505.87 | 2.47× | 0.9936 | 32.776 |
|
|
251
|
+
| FORA(N=3) | 1320.07 | 2.82× | 0.9776 | 32.266 |
|
|
252
|
+
| **[DBCache(F=4,B=0,W=4,MC=4)](https://github.com/vipshop/cache-dit)** | 1400.08 | **2.66×** | **1.0065** | 32.838 |
|
|
253
|
+
| **[DBCache+TaylorSeer(F=1,B=0,O=1)](https://github.com/vipshop/cache-dit)** | 1153.05 | **3.23×** | **1.0221** | 32.819 |
|
|
254
|
+
| DuCa(N=5) | 978.76 | 3.80× | 0.9955 | 32.241 |
|
|
255
|
+
| TaylorSeer(N=4,O=2) | 1042.27 | 3.57× | 0.9857 | 32.413 |
|
|
256
|
+
| **[DBCache(F=1,B=0,W=4,MC=6)](https://github.com/vipshop/cache-dit)** | 944.75 | **3.94×** | 0.9997 | 32.849 |
|
|
257
|
+
| **[DBCache+TaylorSeer(F=1,B=0,O=1)](https://github.com/vipshop/cache-dit)** | 944.75 | **3.94×** | **1.0107** | 32.865 |
|
|
258
|
+
| **[FoCa(N=5): arxiv.2508.16211](https://arxiv.org/pdf/2508.16211)** | 893.54 | **4.16×** | **1.0029** | **32.948** |
|
|
259
|
+
|
|
260
|
+
<details>
|
|
261
|
+
<summary> Show all comparison </summary>
|
|
262
|
+
|
|
263
|
+

|
|
264
|
+
|
|
265
|
+
| Method | TFLOPs(↓) | SpeedUp(↑) | ImageReward(↑) | Clip Score(↑) |
|
|
266
|
+
| --- | --- | --- | --- | --- |
|
|
267
|
+
| [**FLUX.1**-dev]: 50 steps | 3726.87 | 1.00× | 0.9898 | 32.404 |
|
|
268
|
+
| [**FLUX.1**-dev]: 60% steps | 2231.70 | 1.67× | 0.9663 | 32.312 |
|
|
269
|
+
| Δ-DiT(N=2) | 2480.01 | 1.50× | 0.9444 | 32.273 |
|
|
270
|
+
| Δ-DiT(N=3) | 1686.76 | 2.21× | 0.8721 | 32.102 |
|
|
271
|
+
| [**FLUX.1**-dev]: 34% steps | 1264.63 | 3.13× | 0.9453 | 32.114 |
|
|
272
|
+
| Chipmunk | 1505.87 | 2.47× | 0.9936 | 32.776 |
|
|
273
|
+
| FORA(N=3) | 1320.07 | 2.82× | 0.9776 | 32.266 |
|
|
274
|
+
| **[DBCache(F=4,B=0,W=4,MC=4)](https://github.com/vipshop/cache-dit)** | 1400.08 | **2.66×** | **1.0065** | 32.838 |
|
|
275
|
+
| DuCa(N=5) | 978.76 | 3.80× | 0.9955 | 32.241 |
|
|
276
|
+
| TaylorSeer(N=4,O=2) | 1042.27 | 3.57× | 0.9857 | 32.413 |
|
|
277
|
+
| **[DBCache+TaylorSeer(F=1,B=0,O=1)](https://github.com/vipshop/cache-dit)** | 1153.05 | **3.23×** | **1.0221** | 32.819 |
|
|
278
|
+
| **[DBCache(F=1,B=0,W=4,MC=6)](https://github.com/vipshop/cache-dit)** | 944.75 | **3.94×** | 0.9997 | 32.849 |
|
|
279
|
+
| **[DBCache+TaylorSeer(F=1,B=0,O=1)](https://github.com/vipshop/cache-dit)** | 944.75 | **3.94×** | **1.0107** | 32.865 |
|
|
280
|
+
| **[FoCa(N=5): arxiv.2508.16211](https://arxiv.org/pdf/2508.16211)** | 893.54 | **4.16×** | **1.0029** | **32.948** |
|
|
281
|
+
| [**FLUX.1**-dev]: 22% steps | 818.29 | 4.55× | 0.8183 | 31.772 |
|
|
282
|
+
| FORA(N=4) | 967.91 | 3.84× | 0.9730 | 32.142 |
|
|
283
|
+
| ToCa(N=8) | 784.54 | 4.74× | 0.9451 | 31.993 |
|
|
284
|
+
| DuCa(N=7) | 760.14 | 4.89× | 0.9757 | 32.066 |
|
|
285
|
+
| TeaCache(l=0.8) | 892.35 | 4.17× | 0.8683 | 31.704 |
|
|
286
|
+
| **[DBCache(F=4,B=0,W=4,MC=10)](https://github.com/vipshop/cache-dit)** | 816.65 | 4.56x | 0.8245 | 32.191 |
|
|
287
|
+
| TaylorSeer(N=5,O=2) | 893.54 | 4.16× | 0.9768 | 32.467 |
|
|
288
|
+
| **[FoCa(N=7): arxiv.2508.16211](https://arxiv.org/pdf/2508.16211)** | 670.44 | **5.54×** | **0.9891** | **32.920** |
|
|
289
|
+
| FORA(N=7) | 670.14 | 5.55× | 0.7418 | 31.519 |
|
|
290
|
+
| ToCa(N=12) | 644.70 | 5.77× | 0.7155 | 31.808 |
|
|
291
|
+
| DuCa(N=10) | 606.91 | 6.13× | 0.8382 | 31.759 |
|
|
292
|
+
| TeaCache(l=1.2) | 669.27 | 5.56× | 0.7394 | 31.704 |
|
|
293
|
+
| **[DBCache(F=1,B=0,W=4,MC=10)](https://github.com/vipshop/cache-dit)** | 651.90 | **5.72x** | 0.8796 | **32.318** |
|
|
294
|
+
| TaylorSeer(N=7,O=2) | 670.44 | 5.54× | 0.9128 | 32.128 |
|
|
295
|
+
| **[FoCa(N=8): arxiv.2508.16211](https://arxiv.org/pdf/2508.16211)** | 596.07 | **6.24×** | **0.9502** | **32.706** |
|
|
296
|
+
|
|
297
|
+
NOTE: Except for DBCache, other performance data are referenced from the paper [FoCa, arxiv.2508.16211](https://arxiv.org/pdf/2508.16211).
|
|
298
|
+
|
|
299
|
+
</details>
|
|
300
|
+
|
|
228
301
|
## 🔥Quick Start
|
|
229
302
|
|
|
230
303
|
<div id="unified"></div>
|
|
@@ -310,7 +383,7 @@ Please check [🎉Examples](https://github.com/vipshop/cache-dit/blob/main/examp
|
|
|
310
383
|
|
|
311
384
|

|
|
312
385
|
|
|
313
|
-
**DBCache**: **Dual Block Caching** for Diffusion Transformers. Different configurations of compute blocks (**F8B12**, etc.) can be customized in DBCache, enabling a balanced trade-off between performance and precision. Moreover, it can be entirely **training**-**free**. Please Check the [DBCache](https://github.com/vipshop/cache-dit/blob/main/docs/DBCache.md) and [User Guide](https://github.com/vipshop/cache-dit/blob/main/docs/User_Guide.md#dbcache) docs for
|
|
386
|
+
**DBCache**: **Dual Block Caching** for Diffusion Transformers. Different configurations of compute blocks (**F8B12**, etc.) can be customized in DBCache, enabling a balanced trade-off between performance and precision. Moreover, it can be entirely **training**-**free**. Please Check the [DBCache](https://github.com/vipshop/cache-dit/blob/main/docs/DBCache.md) and [User Guide](https://github.com/vipshop/cache-dit/blob/main/docs/User_Guide.md#dbcache) docs for details.
|
|
314
387
|
|
|
315
388
|
```python
|
|
316
389
|
# Default options, F8B0, 8 warmup steps, and unlimited cached
|
|
@@ -384,68 +457,6 @@ cache_dit.enable_cache(
|
|
|
384
457
|
)
|
|
385
458
|
```
|
|
386
459
|
|
|
387
|
-
## 🔥Benchmarks
|
|
388
|
-
|
|
389
|
-
<div id="benchmarks"></div>
|
|
390
|
-
|
|
391
|
-
The comparison between **cache-dit: DBCache** and algorithms such as Δ-DiT, Chipmunk, FORA, DuCa, TaylorSeer and FoCa is as follows. Now, in the comparison with a speedup ratio less than **3x**, cache-dit achieved the best accuracy. Surprisingly, cache-dit: DBCache still works in the extremely few-step distill model. For a complete benchmark, please refer to [📚Benchmarks](https://github.com/vipshop/cache-dit/raw/main/bench/).
|
|
392
|
-
|
|
393
|
-
| Method | TFLOPs(↓) | SpeedUp(↑) | ImageReward(↑) | Clip Score(↑) |
|
|
394
|
-
| --- | --- | --- | --- | --- |
|
|
395
|
-
| [**FLUX.1**-dev]: 50 steps | 3726.87 | 1.00× | 0.9898 | 32.404 |
|
|
396
|
-
| [**FLUX.1**-dev]: 60% steps | 2231.70 | 1.67× | 0.9663 | 32.312 |
|
|
397
|
-
| Δ-DiT(N=2) | 2480.01 | 1.50× | 0.9444 | 32.273 |
|
|
398
|
-
| Δ-DiT(N=3) | 1686.76 | 2.21× | 0.8721 | 32.102 |
|
|
399
|
-
| [**FLUX.1**-dev]: 34% steps | 1264.63 | 3.13× | 0.9453 | 32.114 |
|
|
400
|
-
| Chipmunk | 1505.87 | 2.47× | 0.9936 | 32.776 |
|
|
401
|
-
| FORA(N=3) | 1320.07 | 2.82× | 0.9776 | 32.266 |
|
|
402
|
-
| **[DBCache(F=4,B=0,W=4,MC=4)](https://github.com/vipshop/cache-dit)** | 1400.08 | **2.66×** | **1.0065** | 32.838 |
|
|
403
|
-
| **[DBCache+TaylorSeer(F=1,B=0,O=1)](https://github.com/vipshop/cache-dit)** | 1153.05 | **3.23×** | **1.0221** | 32.819 |
|
|
404
|
-
| DuCa(N=5) | 978.76 | 3.80× | 0.9955 | 32.241 |
|
|
405
|
-
| TaylorSeer(N=4,O=2) | 1042.27 | 3.57× | 0.9857 | 32.413 |
|
|
406
|
-
| **[DBCache(F=1,B=0,W=4,MC=6)](https://github.com/vipshop/cache-dit)** | 944.75 | **3.94×** | 0.9997 | 32.849 |
|
|
407
|
-
| **[DBCache+TaylorSeer(F=1,B=0,O=1)](https://github.com/vipshop/cache-dit)** | 944.75 | **3.94×** | **1.0107** | 32.865 |
|
|
408
|
-
| **[FoCa(N=5): arxiv.2508.16211](https://arxiv.org/pdf/2508.16211)** | 893.54 | **4.16×** | **1.0029** | **32.948** |
|
|
409
|
-
|
|
410
|
-
<details>
|
|
411
|
-
<summary> Show all comparison </summary>
|
|
412
|
-
|
|
413
|
-
| Method | TFLOPs(↓) | SpeedUp(↑) | ImageReward(↑) | Clip Score(↑) |
|
|
414
|
-
| --- | --- | --- | --- | --- |
|
|
415
|
-
| [**FLUX.1**-dev]: 50 steps | 3726.87 | 1.00× | 0.9898 | 32.404 |
|
|
416
|
-
| [**FLUX.1**-dev]: 60% steps | 2231.70 | 1.67× | 0.9663 | 32.312 |
|
|
417
|
-
| Δ-DiT(N=2) | 2480.01 | 1.50× | 0.9444 | 32.273 |
|
|
418
|
-
| Δ-DiT(N=3) | 1686.76 | 2.21× | 0.8721 | 32.102 |
|
|
419
|
-
| [**FLUX.1**-dev]: 34% steps | 1264.63 | 3.13× | 0.9453 | 32.114 |
|
|
420
|
-
| Chipmunk | 1505.87 | 2.47× | 0.9936 | 32.776 |
|
|
421
|
-
| FORA(N=3) | 1320.07 | 2.82× | 0.9776 | 32.266 |
|
|
422
|
-
| **[DBCache(F=4,B=0,W=4,MC=4)](https://github.com/vipshop/cache-dit)** | 1400.08 | **2.66×** | **1.0065** | 32.838 |
|
|
423
|
-
| DuCa(N=5) | 978.76 | 3.80× | 0.9955 | 32.241 |
|
|
424
|
-
| TaylorSeer(N=4,O=2) | 1042.27 | 3.57× | 0.9857 | 32.413 |
|
|
425
|
-
| **[DBCache+TaylorSeer(F=1,B=0,O=1)](https://github.com/vipshop/cache-dit)** | 1153.05 | **3.23×** | **1.0221** | 32.819 |
|
|
426
|
-
| **[DBCache(F=1,B=0,W=4,MC=6)](https://github.com/vipshop/cache-dit)** | 944.75 | **3.94×** | 0.9997 | 32.849 |
|
|
427
|
-
| **[DBCache+TaylorSeer(F=1,B=0,O=1)](https://github.com/vipshop/cache-dit)** | 944.75 | **3.94×** | **1.0107** | 32.865 |
|
|
428
|
-
| **[FoCa(N=5): arxiv.2508.16211](https://arxiv.org/pdf/2508.16211)** | 893.54 | **4.16×** | **1.0029** | **32.948** |
|
|
429
|
-
| [**FLUX.1**-dev]: 22% steps | 818.29 | 4.55× | 0.8183 | 31.772 |
|
|
430
|
-
| FORA(N=4) | 967.91 | 3.84× | 0.9730 | 32.142 |
|
|
431
|
-
| ToCa(N=8) | 784.54 | 4.74× | 0.9451 | 31.993 |
|
|
432
|
-
| DuCa(N=7) | 760.14 | 4.89× | 0.9757 | 32.066 |
|
|
433
|
-
| TeaCache(l=0.8) | 892.35 | 4.17× | 0.8683 | 31.704 |
|
|
434
|
-
| **[DBCache(F=4,B=0,W=4,MC=10)](https://github.com/vipshop/cache-dit)** | 816.65 | 4.56x | 0.8245 | 32.191 |
|
|
435
|
-
| TaylorSeer(N=5,O=2) | 893.54 | 4.16× | 0.9768 | 32.467 |
|
|
436
|
-
| **[FoCa(N=7): arxiv.2508.16211](https://arxiv.org/pdf/2508.16211)** | 670.44 | **5.54×** | **0.9891** | **32.920** |
|
|
437
|
-
| FORA(N=7) | 670.14 | 5.55× | 0.7418 | 31.519 |
|
|
438
|
-
| ToCa(N=12) | 644.70 | 5.77× | 0.7155 | 31.808 |
|
|
439
|
-
| DuCa(N=10) | 606.91 | 6.13× | 0.8382 | 31.759 |
|
|
440
|
-
| TeaCache(l=1.2) | 669.27 | 5.56× | 0.7394 | 31.704 |
|
|
441
|
-
| **[DBCache(F=1,B=0,W=4,MC=10)](https://github.com/vipshop/cache-dit)** | 651.90 | **5.72x** | 0.8796 | **32.318** |
|
|
442
|
-
| TaylorSeer(N=7,O=2) | 670.44 | 5.54× | 0.9128 | 32.128 |
|
|
443
|
-
| **[FoCa(N=8): arxiv.2508.16211](https://arxiv.org/pdf/2508.16211)** | 596.07 | **6.24×** | **0.9502** | **32.706** |
|
|
444
|
-
|
|
445
|
-
NOTE: Except for DBCache, other performance data are referenced from the paper [FoCa, arxiv.2508.16211](https://arxiv.org/pdf/2508.16211).
|
|
446
|
-
|
|
447
|
-
</details>
|
|
448
|
-
|
|
449
460
|
## 🎉User Guide
|
|
450
461
|
|
|
451
462
|
<div id="user-guide"></div>
|
|
@@ -490,6 +501,10 @@ How to contribute? Star ⭐️ this repo to support us or check [CONTRIBUTE.md](
|
|
|
490
501
|
|
|
491
502
|
The **cache-dit** codebase is adapted from FBCache. Over time its codebase diverged a lot, and **cache-dit** API is no longer compatible with FBCache.
|
|
492
503
|
|
|
504
|
+
## ©️Special Acknowledgements
|
|
505
|
+
|
|
506
|
+
Special thanks to vipshop's Computer Vision AI Team for supporting document, testing and production-level deployment of this project.
|
|
507
|
+
|
|
493
508
|
## ©️Citations
|
|
494
509
|
|
|
495
510
|
<div id="citations"></div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
cache_dit/__init__.py,sha256=sHRg0swXZZiw6lvSQ53fcVtN9JRayx0az2lXAz5OOGI,1510
|
|
2
|
-
cache_dit/_version.py,sha256=
|
|
2
|
+
cache_dit/_version.py,sha256=vLA4ITz09S-S435nq6yTF6l3qiSz6w4euS1rOxXgd1M,704
|
|
3
3
|
cache_dit/logger.py,sha256=0zsu42hN-3-rgGC_C29ms1IvVpV4_b4_SwJCKSenxBE,4304
|
|
4
4
|
cache_dit/utils.py,sha256=AyYRwi5XBxYBH4GaXxOxv9-X24Te_IYOYwh54t_1d3A,10674
|
|
5
5
|
cache_dit/cache_factory/.gitignore,sha256=5Cb-qT9wsTUoMJ7vACDF7ZcLpAXhi5v-xdcWSRit988,23
|
|
@@ -13,7 +13,7 @@ cache_dit/cache_factory/block_adapters/__init__.py,sha256=33geXMz56TxFWMp0c-H4__
|
|
|
13
13
|
cache_dit/cache_factory/block_adapters/block_adapters.py,sha256=2TVK_KqiYXC7AKZ2s07fzdOzUoeUBc9P1SzQtLVzhf4,22249
|
|
14
14
|
cache_dit/cache_factory/block_adapters/block_registers.py,sha256=2L7QeM4ygnaKQpC9PoJod0QRYyxidUKU2AYpysDCUwE,2572
|
|
15
15
|
cache_dit/cache_factory/cache_adapters/__init__.py,sha256=py71WGD3JztQ1uk6qdLVbzYcQ1rvqFidNNaQYo7tqTo,79
|
|
16
|
-
cache_dit/cache_factory/cache_adapters/cache_adapter.py,sha256=
|
|
16
|
+
cache_dit/cache_factory/cache_adapters/cache_adapter.py,sha256=7heGoy8LHMP54ISMwfJ-i_ALngkbnUdeQDBRrE-MTgs,21303
|
|
17
17
|
cache_dit/cache_factory/cache_blocks/__init__.py,sha256=mivvm8YOfqT7YHs8y_MzGOGztPw8LxAqKGXuSRXxCv0,3032
|
|
18
18
|
cache_dit/cache_factory/cache_blocks/offload_utils.py,sha256=wusgcqaCrwEjvv7Guy-6VXhNOgPPUrBV2sSVuRmGuvo,3513
|
|
19
19
|
cache_dit/cache_factory/cache_blocks/pattern_0_1_2.py,sha256=ElMps6_7uI74tSF9GDR_dEI0bZEhdzcepM29xFWnYo8,428
|
|
@@ -49,9 +49,9 @@ cache_dit/metrics/metrics.py,sha256=7UV-H2NRbhfr6dvrXEzU97Zy-BSQ5zEfm9CKtaK4ldg,
|
|
|
49
49
|
cache_dit/quantize/__init__.py,sha256=kWYoMAyZgBXu9BJlZjTQ0dRffW9GqeeY9_iTkXrb70A,59
|
|
50
50
|
cache_dit/quantize/quantize_ao.py,sha256=Fx1KW4l3gdEkdrcAYtPoDW7WKBJWrs3glOHiEwW_TgE,6160
|
|
51
51
|
cache_dit/quantize/quantize_interface.py,sha256=2s_R7xPSKuJeFpEGeLwRxnq_CqJcBG3a3lzyW5wh-UM,1241
|
|
52
|
-
cache_dit-0.
|
|
53
|
-
cache_dit-0.
|
|
54
|
-
cache_dit-0.
|
|
55
|
-
cache_dit-0.
|
|
56
|
-
cache_dit-0.
|
|
57
|
-
cache_dit-0.
|
|
52
|
+
cache_dit-1.0.0.dist-info/licenses/LICENSE,sha256=Dqb07Ik2dV41s9nIdMUbiRWEfDqo7-dQeRiY7kPO8PE,3769
|
|
53
|
+
cache_dit-1.0.0.dist-info/METADATA,sha256=HbV42qlhu8PFIO6FD_PuIo1dO-7K-yBiPCc5fikKIsg,35959
|
|
54
|
+
cache_dit-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
55
|
+
cache_dit-1.0.0.dist-info/entry_points.txt,sha256=FX2gysXaZx6NeK1iCLMcIdP8Q4_qikkIHtEmi3oWn8o,65
|
|
56
|
+
cache_dit-1.0.0.dist-info/top_level.txt,sha256=ZJDydonLEhujzz0FOkVbO-BqfzO9d_VqRHmZU-3MOZo,10
|
|
57
|
+
cache_dit-1.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|