安装最强推理加速插件 SageAttention-Windows
SageAttention 用于 GPU 推理加速而效果几乎无损,其提速效果是 FlashAttention2 的 2.1-3.1倍;是 xformers 的 2.7-5.1倍。
要求
- python>=3.9
- torch>=2.3.0
- triton>=3.0.0
- CUDA
=12.8 for Blackwell =12.4 for fp8 support on Ada =12.3 for fp8 support on Hopper =12.0 for Ampere
python 和 torch 的安装相对简单,不再赘述。triton 的安装见 安装 triton-windows;cuda 的安装见 安装 NVIDIA drivers/CUDA/cuDNN
安装
常规命令:
shell
pip install sageattention
ComfyUI 命令:
shell
.\python_embeded\python.exe -m pip install sageattention
Conda 环境:
shell
激活 Conda 环境
pip install sageattention