Skip to content

feat: add native CUDA SageAttention support - #2005

Open
leejet wants to merge 1 commit into
masterfrom
feat/sage-attention
Open

leejet wants to merge 1 commit into
masterfrom
feat/sage-attention

Conversation

@leejet

@leejet leejet commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add --sage-attn and sd_ctx_params_t.sage_attn to enable native CUDA SageAttention2/2++ without Python or Triton.
  • Select kernels by GPU and CUDA toolkit capabilities, with FlashAttention/default fallback for unsupported layers.

Related Issue / Discussion

N/A

Additional Information

.\bin\Release\sd-cli.exe -M vid_gen --diffusion-model  ..\models\diffusion_models\Wan2.2-T2V-A14B-LowNoise-Q8_0.gguf --high-noise-diffusion-model  ..\models\diffusion_models\Wan2.2-T2V-A14B-HighNoise-Q8_0.gguf --vae ..\models\vae\wan_2.1_vae.safetensors --t5xxl ..\models\text_encoders\umt5-xxl-encoder-Q8_0.gguf  -p "a lovely cat" --cfg-scale 3.5 --sampling-method euler --steps 10 --high-noise-cfg-scale 3.5 --high-noise-sampling-method euler --high-noise-steps 8 -v -n "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,
形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走" -W 832 -H 480 --diffusion-fa --offload-to-cpu --video-frames 33 --sage-attn

11.05s/it -> 7.33s/it

Checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant