Skip to content

Commit bdec816

Browse files
authored
move STA_configuration.py to fastvideo/attention/backends (#856)
1 parent 2cd2e57 commit bdec816

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

csrc/attn/sliding_tile_attn/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ We give a demo for 2D STA with window size (6,6) operating on a (10, 10) image.
7272

7373
https://github.com/user-attachments/assets/f3b6dd79-7b43-4b60-a0fa-3d6495ec5747
7474

75+
76+
## STA Configuration Logic
77+
Here is a diagram of how the window is configured and passed through the FastVideo pipeline:
78+
79+
<div align="center">
80+
<img src="../../../docs/source/_static/images/STA_configuration.png" width="80%"/>
81+
</div>
82+
83+
7584
## Why is STA Fast?
7685
2D/3D Sliding Window Attention (SWA) creates many mixed blocks in the attention map. Even though mixed blocks have less output value,a mixed block is significantly slower than a dense block due to the GPU-unfriendly masking operation.
7786

97.8 KB
Loading
File renamed without changes.

fastvideo/pipelines/stages/denoising.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ def prepare_sta_param(self, batch: ForwardBatch,
575575
fastvideo_args: The inference arguments.
576576
"""
577577
# TODO(kevin): STA mask search, currently only support Wan2.1 with 69x768x1280
578-
from fastvideo.STA_configuration import configure_sta
578+
from fastvideo.attention.backends.STA_configuration import configure_sta
579579
STA_mode = fastvideo_args.STA_mode
580580
skip_time_steps = fastvideo_args.skip_time_steps
581581
if batch.timesteps is None:
@@ -682,7 +682,7 @@ def save_sta_search_results(self, batch: ForwardBatch):
682682
raise NotImplementedError(
683683
"STA mask search is not supported for this resolution")
684684

685-
from fastvideo.STA_configuration import save_mask_search_results
685+
from fastvideo.attention.backends.STA_configuration import save_mask_search_results
686686
if batch.mask_search_final_result_pos is not None and batch.prompt is not None:
687687
save_mask_search_results(
688688
[

0 commit comments

Comments
 (0)