Skip to content

Commit d7f399d

Browse files
author
yiyi@huggingface.co
committed
add a notes on the doc about attention backend
1 parent 237d318 commit d7f399d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

docs/source/en/api/pipelines/hunyuan_video15.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ video = pipeline(prompt=prompt, num_frames=61, num_inference_steps=30).frames[0]
5252
export_to_video(video, "output.mp4", fps=15)
5353
```
5454

55+
## Notes
56+
57+
- HunyuanVideo1.5 use attention masks with avariable-length sequences. For best performance, we recommend using an attention backend that handles padding efficiently.
58+
59+
- **H100/H800:** `_flash_3_hub` or `_flash_varlen_3`
60+
- **A100/A800/RTX 4090:** `flash` or `flash_varlen`
61+
- **Other GPUs:** `sage`
62+
63+
```py
64+
pipe.transformer.set_attention_backend("flash_varlen") # or your preferred backend
65+
```
66+
5567

5668
## HunyuanVideo15Pipeline
5769

0 commit comments

Comments
 (0)