forked from xdit-project/xDiT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add ditfastattn in readme, and seperate cogvideo and ditfastattn run …
…scripts. (xdit-project#298)
- Loading branch information
1 parent
25d5ede
commit 542cf6a
Showing
4 changed files
with
116 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
### DiTFastAttn | ||
|
||
[DiTFastAttn](https://github.com/thu-nics/DiTFastAttn) is an acceleration solution for single-GPU DiTs inference, utilizing Input Temporal Reduction to reduce computational complexity through the following three methods: | ||
|
||
1. Window Attention with Residual Caching to reduce spatial redundancy. | ||
2. Temporal Similarity Reduction to exploit the similarity between steps. | ||
3. Conditional Redundancy Elimination to skip redundant computations during conditional generation | ||
|
||
Currently, DiTFastAttn can only be used with data parallelism or on a single GPU. It does not support other parallel methods such as USP and PipeFusion. We plan to implement a parallel version of DiTFastAttn in the future. | ||
|
||
## Download COCO Dataset | ||
``` | ||
wget http://images.cocodataset.org/annotations/annotations_trainval2014.zip | ||
unzip annotations_trainval2014.zip | ||
``` | ||
|
||
## Running | ||
|
||
Modify the dataset path in the script, then run | ||
|
||
``` | ||
bash examples/run_fastditattn.sh | ||
``` | ||
|
||
## Reference | ||
|
||
``` | ||
@misc{yuan2024ditfastattn, | ||
title={DiTFastAttn: Attention Compression for Diffusion Transformer Models}, | ||
author={Zhihang Yuan and Pu Lu and Hanling Zhang and Xuefei Ning and Linfeng Zhang and Tianchen Zhao and Shengen Yan and Guohao Dai and Yu Wang}, | ||
year={2024}, | ||
eprint={2406.08552}, | ||
archivePrefix={arXiv}, | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
### DiTFastAttn | ||
|
||
[DiTFastAttn](https://github.com/thu-nics/DiTFastAttn)是一种针对单卡DiTs推理的加速方案,利用Input Temperal Reduction通过如下三种方式来减少计算量: | ||
|
||
1. Window Attention with Residual Caching to reduce spatial redundancy. | ||
2. Temporal Similarity Reduction to exploit the similarity between steps. | ||
3. Conditional Redundancy Elimination to skip redundant computations during conditional generation | ||
|
||
目前使用DiTFastAttn只能数据并行,或者单GPU运行。不支持其他方式并行,比如USP和PipeFusion等。我们未来计划实现并行版本的DiTFastAttn。 | ||
|
||
## 下载COCO数据集 | ||
``` | ||
wget http://images.cocodataset.org/annotations/annotations_trainval2014.zip | ||
unzip annotations_trainval2014.zip | ||
``` | ||
|
||
## 运行 | ||
|
||
在脚本中修改数据集路径,然后运行 | ||
|
||
``` | ||
bash examples/run_fastditattn.sh | ||
``` | ||
|
||
## 引用 | ||
|
||
``` | ||
@misc{yuan2024ditfastattn, | ||
title={DiTFastAttn: Attention Compression for Diffusion Transformer Models}, | ||
author={Zhihang Yuan and Pu Lu and Hanling Zhang and Xuefei Ning and Linfeng Zhang and Tianchen Zhao and Shengen Yan and Guohao Dai and Yu Wang}, | ||
year={2024}, | ||
eprint={2406.08552}, | ||
archivePrefix={arXiv}, | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters