mirror of
https://github.com/Comfy-Org/comfy-kitchen.git
synced 2026-11-04 23:37:42 +00:00
[PR #42] [CLOSED] Add Sage Attention (CORE-74) #99
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-kitchen#99
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/comfy-kitchen/pull/42
Author: @contentis
Created: 5/20/2026
Status: ❌ Closed
Base:
main← Head:sage_attn📝 Commits (10+)
2bddbf9poc sage attention1d1cdefEnhance CUDA backend for SageAttention: update CMake configurations for new FP8 kernels, improve error handling in sage_sdpa, and streamline quantization kernels. Also, fix exception types in tests for better clarity.926f719formatting1285876clean up and fixes9883175build fixaa4edc7speed23ca166acc fixe8066d5ruff format55f594eadd f32 input for sage + readme updated0f5a79Merge upstream/main into sage_attn📊 Changes
21 files changed (+5387 additions, -11 deletions)
View changed files
📝
NOTICE(+12 -0)📝
README.md(+34 -0)📝
comfy_kitchen/__init__.py(+32 -0)📝
comfy_kitchen/backends/cuda/CMakeLists.txt(+21 -0)📝
comfy_kitchen/backends/cuda/dlpack_bindings.cpp(+299 -0)📝
comfy_kitchen/backends/cuda/float_utils.cuh(+36 -11)➕
comfy_kitchen/backends/cuda/sage_attention/attn_utils.cuh(+1013 -0)➕
comfy_kitchen/backends/cuda/sage_attention/cp_async.cuh(+150 -0)➕
comfy_kitchen/backends/cuda/sage_attention/math.cuh(+170 -0)➕
comfy_kitchen/backends/cuda/sage_attention/mma.cuh(+660 -0)➕
comfy_kitchen/backends/cuda/sage_attention/numeric_conversion.cuh(+159 -0)➕
comfy_kitchen/backends/cuda/sage_attention/permuted_smem.cuh(+213 -0)➕
comfy_kitchen/backends/cuda/sage_attention/qk_int_sv_f8_cuda_sm89.cuh(+821 -0)➕
comfy_kitchen/backends/cuda/sage_attention/quant_qk_int8.cu(+552 -0)➕
comfy_kitchen/backends/cuda/sage_attention/quant_v_fp8.cu(+191 -0)➕
comfy_kitchen/backends/cuda/sage_attention/sage_attn_launcher.cu(+111 -0)➕
comfy_kitchen/sage_attention.py(+213 -0)📝
tests/__init__.py(+1 -0)➕
tests/sage_triton_ref/__init__.py(+2 -0)➕
tests/sage_triton_ref/quant_per_thread.py(+221 -0)...and 1 more files
📄 Description
This PR adds the kernel for SageAttention 2 using FP8 and slighlty updated quantization kernels for improved end-to-end performance.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.