cache-dit 0.1.0__tar.gz → 0.1.1__tar.gz
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-0.1.0 → cache_dit-0.1.1}/PKG-INFO +10 -10
- {cache_dit-0.1.0 → cache_dit-0.1.1}/README.md +9 -9
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/_version.py +2 -2
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/__init__.py +3 -1
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit.egg-info/PKG-INFO +10 -10
- {cache_dit-0.1.0 → cache_dit-0.1.1}/.github/workflows/issue.yml +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/.gitignore +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/.pre-commit-config.yaml +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/CONTRIBUTE.md +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/LICENSE +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/MANIFEST.in +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBCACHE_F12B12S4_R0.2_S16.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBCACHE_F12B16S4_R0.08_S6.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBCACHE_F16B16S2_R0.2_S14.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBCACHE_F16B16S4_R0.2_S13.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBCACHE_F1B0S1_R0.08_S11.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBCACHE_F1B0S1_R0.2_S19.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBCACHE_F8B0S2_R0.12_S12.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBCACHE_F8B16S1_R0.2_S18.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBCACHE_F8B8S1_R0.08_S9.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBCACHE_F8B8S1_R0.12_S12.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBCACHE_F8B8S1_R0.15_S15.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBCache.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBPRUNE_F1B0_R0.03_P24.0_T19.43s.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBPRUNE_F1B0_R0.04_P34.6_T16.82s.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBPRUNE_F1B0_R0.05_P38.3_T15.95s.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBPRUNE_F1B0_R0.06_P45.2_T14.24s.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBPRUNE_F1B0_R0.07_P52.3_T12.53s.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBPRUNE_F1B0_R0.08_P52.4_T12.52s.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBPRUNE_F1B0_R0.09_P59.2_T10.81s.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBPRUNE_F1B0_R0.12_P59.5_T10.76s.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBPRUNE_F1B0_R0.12_P63.0_T9.90s.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBPRUNE_F1B0_R0.1_P62.8_T9.95s.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBPRUNE_F1B0_R0.2_P59.5_T10.66s.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/DBPRUNE_F1B0_R0.3_P63.1_T9.79s.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/assets/NONE_R0.08_S0.png +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/bench/.gitignore +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/bench/bench.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/docs/.gitignore +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/examples/.gitignore +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/examples/run_flux.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/pyproject.toml +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/pytest.ini +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/requirements.txt +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/setup.cfg +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/setup.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/__init__.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/dual_block_cache/__init__.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/dual_block_cache/cache_context.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/dual_block_cache/diffusers_adapters/__init__.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/dual_block_cache/diffusers_adapters/cogvideox.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/dual_block_cache/diffusers_adapters/flux.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/dual_block_cache/diffusers_adapters/mochi.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/dynamic_block_prune/__init__.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/dynamic_block_prune/diffusers_adapters/__init__.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/dynamic_block_prune/diffusers_adapters/cogvideox.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/dynamic_block_prune/diffusers_adapters/flux.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/dynamic_block_prune/diffusers_adapters/mochi.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/dynamic_block_prune/prune_context.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/first_block_cache/__init__.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/first_block_cache/cache_context.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/first_block_cache/diffusers_adapters/__init__.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/first_block_cache/diffusers_adapters/cogvideox.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/first_block_cache/diffusers_adapters/flux.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/first_block_cache/diffusers_adapters/mochi.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/first_block_cache/diffusers_adapters/wan.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/taylorseer.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/utils.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/logger.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/primitives.py +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit.egg-info/SOURCES.txt +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit.egg-info/dependency_links.txt +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit.egg-info/requires.txt +0 -0
- {cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cache_dit
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: ⚡️DBCache: A Training-free UNet-style Cache Acceleration for Diffusion Transformers
|
|
5
5
|
Author: DefTruth, vipshop.com, etc.
|
|
6
6
|
Maintainer: DefTruth, vipshop.com, etc
|
|
@@ -37,13 +37,13 @@ Dynamic: requires-python
|
|
|
37
37
|
<p align="center">
|
|
38
38
|
<h3>⚡️DBCache: A Training-free UNet-style Cache Acceleration for <br>Diffusion Transformers</h2>
|
|
39
39
|
</p>
|
|
40
|
-
<img src=https://github.com/vipshop/DBCache/
|
|
40
|
+
<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCache.png >
|
|
41
41
|
<div align='center'>
|
|
42
42
|
<img src=https://img.shields.io/badge/Language-Python-brightgreen.svg >
|
|
43
43
|
<img src=https://img.shields.io/badge/PRs-welcome-9cf.svg >
|
|
44
|
-
<img src=https://img.shields.io/badge/
|
|
44
|
+
<img src=https://img.shields.io/badge/PyPI-pass-brightgreen.svg >
|
|
45
45
|
<img src=https://img.shields.io/badge/Python-3.10|3.11|3.12-9cf.svg >
|
|
46
|
-
<img src=https://img.shields.io/badge/Release-v0.1.
|
|
46
|
+
<img src=https://img.shields.io/badge/Release-v0.1.1-brightgreen.svg >
|
|
47
47
|
</div>
|
|
48
48
|
<p align="center">
|
|
49
49
|
DeepCache requires UNet’s U-shape, but DiT lacks it. Most DiT cache accelerators are complex and not training-free. DBCache builds on FBCache to create a training-free, UNet-style cache accelerator for DiT.
|
|
@@ -69,7 +69,7 @@ Dynamic: requires-python
|
|
|
69
69
|
|Baseline(L20x1)|F1B0 (0.08)|F1B0 (0.20)|F8B8 (0.15)|F12B12 (0.20)|F16B16 (0.20)|
|
|
70
70
|
|:---:|:---:|:---:|:---:|:---:|:---:|
|
|
71
71
|
|24.85s|15.59s|8.58s|15.41s|15.11s|17.74s|
|
|
72
|
-
|<img src=https://github.com/vipshop/DBCache/
|
|
72
|
+
|<img src=https://github.com/vipshop/DBCache/raw/main/assets/NONE_R0.08_S0.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCACHE_F1B0S1_R0.08_S11.png width=105px> | <img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCACHE_F1B0S1_R0.2_S19.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCACHE_F8B8S1_R0.15_S15.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCACHE_F12B12S4_R0.2_S16.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCACHE_F16B16S4_R0.2_S13.png width=105px>|
|
|
73
73
|
|**Baseline(L20x1)**|**F1B0 (0.08)**|**F8B8 (0.12)**|**F8B12 (0.20)**|**F8B16 (0.20)**|**F8B20 (0.20)**|
|
|
74
74
|
|27.85s|6.04s|5.88s|5.77s|6.01s|6.20s|
|
|
75
75
|
|<img src=https://github.com/user-attachments/assets/70ea57f4-d8f2-415b-8a96-d8315974a5e6 width=105px>|<img src=https://github.com/user-attachments/assets/fc0e1a67-19cc-44aa-bf50-04696e7978a0 width=105px> |<img src=https://github.com/user-attachments/assets/d1434896-628c-436b-95ad-43c085a8629e width=105px>|<img src=https://github.com/user-attachments/assets/aaa42cd2-57de-4c4e-8bfb-913018a8251d width=105px>|<img src=https://github.com/user-attachments/assets/dc0ba2a4-ef7c-436d-8a39-67055deab92f width=105px>|<img src=https://github.com/user-attachments/assets/aede466f-61ed-4256-8df0-fecf8020c5ca width=105px>|
|
|
@@ -93,7 +93,7 @@ These case studies demonstrate that even with relatively high thresholds (such a
|
|
|
93
93
|
|Baseline(L20x1)|Pruned(24%)|Pruned(35%)|Pruned(38%)|Pruned(45%)|Pruned(60%)|
|
|
94
94
|
|:---:|:---:|:---:|:---:|:---:|:---:|
|
|
95
95
|
|24.85s|19.43s|16.82s|15.95s|14.24s|10.66s|
|
|
96
|
-
|<img src=https://github.com/vipshop/DBCache/
|
|
96
|
+
|<img src=https://github.com/vipshop/DBCache/raw/main/assets/NONE_R0.08_S0.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.03_P24.0_T19.43s.png width=105px> | <img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.04_P34.6_T16.82s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.05_P38.3_T15.95s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.06_P45.2_T14.24s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.2_P59.5_T10.66s.png width=105px>|
|
|
97
97
|
|
|
98
98
|
<div align="center">
|
|
99
99
|
<p align="center">
|
|
@@ -270,7 +270,7 @@ apply_cache_on_pipe(pipe, **cache_options)
|
|
|
270
270
|
|Baseline(L20x1)|Pruned(24%)|Pruned(35%)|Pruned(38%)|Pruned(45%)|Pruned(60%)|
|
|
271
271
|
|:---:|:---:|:---:|:---:|:---:|:---:|
|
|
272
272
|
|24.85s|19.43s|16.82s|15.95s|14.24s|10.66s|
|
|
273
|
-
|<img src=https://github.com/vipshop/DBCache/
|
|
273
|
+
|<img src=https://github.com/vipshop/DBCache/raw/main/assets/NONE_R0.08_S0.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.03_P24.0_T19.43s.png width=105px> | <img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.04_P34.6_T16.82s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.05_P38.3_T15.95s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.06_P45.2_T14.24s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.2_P59.5_T10.66s.png width=105px>|
|
|
274
274
|
|
|
275
275
|
## 🎉Context Parallelism
|
|
276
276
|
|
|
@@ -333,9 +333,9 @@ Otherwise, the recompile_limit error may be triggered, causing the module to fal
|
|
|
333
333
|
|
|
334
334
|
<div id="supported"></div>
|
|
335
335
|
|
|
336
|
-
- [🚀FLUX.1](https://github.com/vipshop/DBCache/
|
|
337
|
-
- [🚀CogVideoX](https://github.com/vipshop/DBCache/
|
|
338
|
-
- [🚀Mochi](https://github.com/vipshop/DBCache/
|
|
336
|
+
- [🚀FLUX.1](https://github.com/vipshop/DBCache/raw/main/src/cache_dit/cache_factory/dual_block_cache/diffusers_adapters)
|
|
337
|
+
- [🚀CogVideoX](https://github.com/vipshop/DBCache/raw/main/src/cache_dit/cache_factory/dual_block_cache/diffusers_adapters)
|
|
338
|
+
- [🚀Mochi](https://github.com/vipshop/DBCache/raw/main/src/cache_dit/cache_factory/dual_block_cache/diffusers_adapters)
|
|
339
339
|
|
|
340
340
|
## 👋Contribute
|
|
341
341
|
<div id="contribute"></div>
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
<p align="center">
|
|
3
3
|
<h3>⚡️DBCache: A Training-free UNet-style Cache Acceleration for <br>Diffusion Transformers</h2>
|
|
4
4
|
</p>
|
|
5
|
-
<img src=https://github.com/vipshop/DBCache/
|
|
5
|
+
<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCache.png >
|
|
6
6
|
<div align='center'>
|
|
7
7
|
<img src=https://img.shields.io/badge/Language-Python-brightgreen.svg >
|
|
8
8
|
<img src=https://img.shields.io/badge/PRs-welcome-9cf.svg >
|
|
9
|
-
<img src=https://img.shields.io/badge/
|
|
9
|
+
<img src=https://img.shields.io/badge/PyPI-pass-brightgreen.svg >
|
|
10
10
|
<img src=https://img.shields.io/badge/Python-3.10|3.11|3.12-9cf.svg >
|
|
11
|
-
<img src=https://img.shields.io/badge/Release-v0.1.
|
|
11
|
+
<img src=https://img.shields.io/badge/Release-v0.1.1-brightgreen.svg >
|
|
12
12
|
</div>
|
|
13
13
|
<p align="center">
|
|
14
14
|
DeepCache requires UNet’s U-shape, but DiT lacks it. Most DiT cache accelerators are complex and not training-free. DBCache builds on FBCache to create a training-free, UNet-style cache accelerator for DiT.
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|Baseline(L20x1)|F1B0 (0.08)|F1B0 (0.20)|F8B8 (0.15)|F12B12 (0.20)|F16B16 (0.20)|
|
|
35
35
|
|:---:|:---:|:---:|:---:|:---:|:---:|
|
|
36
36
|
|24.85s|15.59s|8.58s|15.41s|15.11s|17.74s|
|
|
37
|
-
|<img src=https://github.com/vipshop/DBCache/
|
|
37
|
+
|<img src=https://github.com/vipshop/DBCache/raw/main/assets/NONE_R0.08_S0.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCACHE_F1B0S1_R0.08_S11.png width=105px> | <img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCACHE_F1B0S1_R0.2_S19.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCACHE_F8B8S1_R0.15_S15.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCACHE_F12B12S4_R0.2_S16.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCACHE_F16B16S4_R0.2_S13.png width=105px>|
|
|
38
38
|
|**Baseline(L20x1)**|**F1B0 (0.08)**|**F8B8 (0.12)**|**F8B12 (0.20)**|**F8B16 (0.20)**|**F8B20 (0.20)**|
|
|
39
39
|
|27.85s|6.04s|5.88s|5.77s|6.01s|6.20s|
|
|
40
40
|
|<img src=https://github.com/user-attachments/assets/70ea57f4-d8f2-415b-8a96-d8315974a5e6 width=105px>|<img src=https://github.com/user-attachments/assets/fc0e1a67-19cc-44aa-bf50-04696e7978a0 width=105px> |<img src=https://github.com/user-attachments/assets/d1434896-628c-436b-95ad-43c085a8629e width=105px>|<img src=https://github.com/user-attachments/assets/aaa42cd2-57de-4c4e-8bfb-913018a8251d width=105px>|<img src=https://github.com/user-attachments/assets/dc0ba2a4-ef7c-436d-8a39-67055deab92f width=105px>|<img src=https://github.com/user-attachments/assets/aede466f-61ed-4256-8df0-fecf8020c5ca width=105px>|
|
|
@@ -58,7 +58,7 @@ These case studies demonstrate that even with relatively high thresholds (such a
|
|
|
58
58
|
|Baseline(L20x1)|Pruned(24%)|Pruned(35%)|Pruned(38%)|Pruned(45%)|Pruned(60%)|
|
|
59
59
|
|:---:|:---:|:---:|:---:|:---:|:---:|
|
|
60
60
|
|24.85s|19.43s|16.82s|15.95s|14.24s|10.66s|
|
|
61
|
-
|<img src=https://github.com/vipshop/DBCache/
|
|
61
|
+
|<img src=https://github.com/vipshop/DBCache/raw/main/assets/NONE_R0.08_S0.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.03_P24.0_T19.43s.png width=105px> | <img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.04_P34.6_T16.82s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.05_P38.3_T15.95s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.06_P45.2_T14.24s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.2_P59.5_T10.66s.png width=105px>|
|
|
62
62
|
|
|
63
63
|
<div align="center">
|
|
64
64
|
<p align="center">
|
|
@@ -235,7 +235,7 @@ apply_cache_on_pipe(pipe, **cache_options)
|
|
|
235
235
|
|Baseline(L20x1)|Pruned(24%)|Pruned(35%)|Pruned(38%)|Pruned(45%)|Pruned(60%)|
|
|
236
236
|
|:---:|:---:|:---:|:---:|:---:|:---:|
|
|
237
237
|
|24.85s|19.43s|16.82s|15.95s|14.24s|10.66s|
|
|
238
|
-
|<img src=https://github.com/vipshop/DBCache/
|
|
238
|
+
|<img src=https://github.com/vipshop/DBCache/raw/main/assets/NONE_R0.08_S0.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.03_P24.0_T19.43s.png width=105px> | <img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.04_P34.6_T16.82s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.05_P38.3_T15.95s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.06_P45.2_T14.24s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.2_P59.5_T10.66s.png width=105px>|
|
|
239
239
|
|
|
240
240
|
## 🎉Context Parallelism
|
|
241
241
|
|
|
@@ -298,9 +298,9 @@ Otherwise, the recompile_limit error may be triggered, causing the module to fal
|
|
|
298
298
|
|
|
299
299
|
<div id="supported"></div>
|
|
300
300
|
|
|
301
|
-
- [🚀FLUX.1](https://github.com/vipshop/DBCache/
|
|
302
|
-
- [🚀CogVideoX](https://github.com/vipshop/DBCache/
|
|
303
|
-
- [🚀Mochi](https://github.com/vipshop/DBCache/
|
|
301
|
+
- [🚀FLUX.1](https://github.com/vipshop/DBCache/raw/main/src/cache_dit/cache_factory/dual_block_cache/diffusers_adapters)
|
|
302
|
+
- [🚀CogVideoX](https://github.com/vipshop/DBCache/raw/main/src/cache_dit/cache_factory/dual_block_cache/diffusers_adapters)
|
|
303
|
+
- [🚀Mochi](https://github.com/vipshop/DBCache/raw/main/src/cache_dit/cache_factory/dual_block_cache/diffusers_adapters)
|
|
304
304
|
|
|
305
305
|
## 👋Contribute
|
|
306
306
|
<div id="contribute"></div>
|
|
@@ -160,7 +160,9 @@ def apply_cache_on_pipe(pipe: DiffusionPipeline, *args, **kwargs):
|
|
|
160
160
|
elif cache_type == CacheType.DBPrune:
|
|
161
161
|
return apply_db_prune_on_pipe(pipe, *args, **kwargs)
|
|
162
162
|
elif cache_type == CacheType.NONE:
|
|
163
|
-
logger.warning(
|
|
163
|
+
logger.warning(
|
|
164
|
+
f"Cache type is {cache_type}, no caching will be applied."
|
|
165
|
+
)
|
|
164
166
|
return pipe
|
|
165
167
|
else:
|
|
166
168
|
raise ValueError(f"Unknown cache type: {cache_type}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cache_dit
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: ⚡️DBCache: A Training-free UNet-style Cache Acceleration for Diffusion Transformers
|
|
5
5
|
Author: DefTruth, vipshop.com, etc.
|
|
6
6
|
Maintainer: DefTruth, vipshop.com, etc
|
|
@@ -37,13 +37,13 @@ Dynamic: requires-python
|
|
|
37
37
|
<p align="center">
|
|
38
38
|
<h3>⚡️DBCache: A Training-free UNet-style Cache Acceleration for <br>Diffusion Transformers</h2>
|
|
39
39
|
</p>
|
|
40
|
-
<img src=https://github.com/vipshop/DBCache/
|
|
40
|
+
<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCache.png >
|
|
41
41
|
<div align='center'>
|
|
42
42
|
<img src=https://img.shields.io/badge/Language-Python-brightgreen.svg >
|
|
43
43
|
<img src=https://img.shields.io/badge/PRs-welcome-9cf.svg >
|
|
44
|
-
<img src=https://img.shields.io/badge/
|
|
44
|
+
<img src=https://img.shields.io/badge/PyPI-pass-brightgreen.svg >
|
|
45
45
|
<img src=https://img.shields.io/badge/Python-3.10|3.11|3.12-9cf.svg >
|
|
46
|
-
<img src=https://img.shields.io/badge/Release-v0.1.
|
|
46
|
+
<img src=https://img.shields.io/badge/Release-v0.1.1-brightgreen.svg >
|
|
47
47
|
</div>
|
|
48
48
|
<p align="center">
|
|
49
49
|
DeepCache requires UNet’s U-shape, but DiT lacks it. Most DiT cache accelerators are complex and not training-free. DBCache builds on FBCache to create a training-free, UNet-style cache accelerator for DiT.
|
|
@@ -69,7 +69,7 @@ Dynamic: requires-python
|
|
|
69
69
|
|Baseline(L20x1)|F1B0 (0.08)|F1B0 (0.20)|F8B8 (0.15)|F12B12 (0.20)|F16B16 (0.20)|
|
|
70
70
|
|:---:|:---:|:---:|:---:|:---:|:---:|
|
|
71
71
|
|24.85s|15.59s|8.58s|15.41s|15.11s|17.74s|
|
|
72
|
-
|<img src=https://github.com/vipshop/DBCache/
|
|
72
|
+
|<img src=https://github.com/vipshop/DBCache/raw/main/assets/NONE_R0.08_S0.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCACHE_F1B0S1_R0.08_S11.png width=105px> | <img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCACHE_F1B0S1_R0.2_S19.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCACHE_F8B8S1_R0.15_S15.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCACHE_F12B12S4_R0.2_S16.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBCACHE_F16B16S4_R0.2_S13.png width=105px>|
|
|
73
73
|
|**Baseline(L20x1)**|**F1B0 (0.08)**|**F8B8 (0.12)**|**F8B12 (0.20)**|**F8B16 (0.20)**|**F8B20 (0.20)**|
|
|
74
74
|
|27.85s|6.04s|5.88s|5.77s|6.01s|6.20s|
|
|
75
75
|
|<img src=https://github.com/user-attachments/assets/70ea57f4-d8f2-415b-8a96-d8315974a5e6 width=105px>|<img src=https://github.com/user-attachments/assets/fc0e1a67-19cc-44aa-bf50-04696e7978a0 width=105px> |<img src=https://github.com/user-attachments/assets/d1434896-628c-436b-95ad-43c085a8629e width=105px>|<img src=https://github.com/user-attachments/assets/aaa42cd2-57de-4c4e-8bfb-913018a8251d width=105px>|<img src=https://github.com/user-attachments/assets/dc0ba2a4-ef7c-436d-8a39-67055deab92f width=105px>|<img src=https://github.com/user-attachments/assets/aede466f-61ed-4256-8df0-fecf8020c5ca width=105px>|
|
|
@@ -93,7 +93,7 @@ These case studies demonstrate that even with relatively high thresholds (such a
|
|
|
93
93
|
|Baseline(L20x1)|Pruned(24%)|Pruned(35%)|Pruned(38%)|Pruned(45%)|Pruned(60%)|
|
|
94
94
|
|:---:|:---:|:---:|:---:|:---:|:---:|
|
|
95
95
|
|24.85s|19.43s|16.82s|15.95s|14.24s|10.66s|
|
|
96
|
-
|<img src=https://github.com/vipshop/DBCache/
|
|
96
|
+
|<img src=https://github.com/vipshop/DBCache/raw/main/assets/NONE_R0.08_S0.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.03_P24.0_T19.43s.png width=105px> | <img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.04_P34.6_T16.82s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.05_P38.3_T15.95s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.06_P45.2_T14.24s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.2_P59.5_T10.66s.png width=105px>|
|
|
97
97
|
|
|
98
98
|
<div align="center">
|
|
99
99
|
<p align="center">
|
|
@@ -270,7 +270,7 @@ apply_cache_on_pipe(pipe, **cache_options)
|
|
|
270
270
|
|Baseline(L20x1)|Pruned(24%)|Pruned(35%)|Pruned(38%)|Pruned(45%)|Pruned(60%)|
|
|
271
271
|
|:---:|:---:|:---:|:---:|:---:|:---:|
|
|
272
272
|
|24.85s|19.43s|16.82s|15.95s|14.24s|10.66s|
|
|
273
|
-
|<img src=https://github.com/vipshop/DBCache/
|
|
273
|
+
|<img src=https://github.com/vipshop/DBCache/raw/main/assets/NONE_R0.08_S0.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.03_P24.0_T19.43s.png width=105px> | <img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.04_P34.6_T16.82s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.05_P38.3_T15.95s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.06_P45.2_T14.24s.png width=105px>|<img src=https://github.com/vipshop/DBCache/raw/main/assets/DBPRUNE_F1B0_R0.2_P59.5_T10.66s.png width=105px>|
|
|
274
274
|
|
|
275
275
|
## 🎉Context Parallelism
|
|
276
276
|
|
|
@@ -333,9 +333,9 @@ Otherwise, the recompile_limit error may be triggered, causing the module to fal
|
|
|
333
333
|
|
|
334
334
|
<div id="supported"></div>
|
|
335
335
|
|
|
336
|
-
- [🚀FLUX.1](https://github.com/vipshop/DBCache/
|
|
337
|
-
- [🚀CogVideoX](https://github.com/vipshop/DBCache/
|
|
338
|
-
- [🚀Mochi](https://github.com/vipshop/DBCache/
|
|
336
|
+
- [🚀FLUX.1](https://github.com/vipshop/DBCache/raw/main/src/cache_dit/cache_factory/dual_block_cache/diffusers_adapters)
|
|
337
|
+
- [🚀CogVideoX](https://github.com/vipshop/DBCache/raw/main/src/cache_dit/cache_factory/dual_block_cache/diffusers_adapters)
|
|
338
|
+
- [🚀Mochi](https://github.com/vipshop/DBCache/raw/main/src/cache_dit/cache_factory/dual_block_cache/diffusers_adapters)
|
|
339
339
|
|
|
340
340
|
## 👋Contribute
|
|
341
341
|
<div id="contribute"></div>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/dual_block_cache/__init__.py
RENAMED
|
File without changes
|
{cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/dual_block_cache/cache_context.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/dynamic_block_prune/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/dynamic_block_prune/prune_context.py
RENAMED
|
File without changes
|
{cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/first_block_cache/__init__.py
RENAMED
|
File without changes
|
{cache_dit-0.1.0 → cache_dit-0.1.1}/src/cache_dit/cache_factory/first_block_cache/cache_context.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|