mirror of
https://github.com/Comfy-Org/comfy-kitchen.git
synced 2026-11-04 23:37:42 +00:00
[PR #103] [MERGED] Implement optimized int8 attention (CORE-74) #147
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#147
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/103
Author: @comfyanonymous
Created: 8/10/2026
Status: ✅ Merged
Merged: 8/11/2026
Merged by: @comfyanonymous
Base:
main← Head:dev/comfy_int8📝 Commits (3)
9243fb3Implement optimized int8 attention.1a25155Fix Nan on some models and other improvements.215cc5acleanups.📊 Changes
18 files changed (+6762 additions, -2 deletions)
View changed files
📝
NOTICE(+11 -1)📝
README.md(+1 -0)📝
comfy_kitchen/__init__.py(+12 -0)📝
comfy_kitchen/backends/cuda/CMakeLists.txt(+4 -0)📝
comfy_kitchen/backends/cuda/dlpack_bindings.cpp(+663 -0)📝
comfy_kitchen/backends/cuda/float_utils.cuh(+35 -1)➕
comfy_kitchen/backends/cuda/sage_attention/attn_utils.cuh(+1247 -0)➕
comfy_kitchen/backends/cuda/sage_attention/cp_async.cuh(+151 -0)➕
comfy_kitchen/backends/cuda/sage_attention/math.cuh(+171 -0)➕
comfy_kitchen/backends/cuda/sage_attention/mma.cuh(+808 -0)➕
comfy_kitchen/backends/cuda/sage_attention/numeric_conversion.cuh(+159 -0)➕
comfy_kitchen/backends/cuda/sage_attention/permuted_smem.cuh(+214 -0)➕
comfy_kitchen/backends/cuda/sage_attention/qk_int_sv_i8_cuda.cuh(+834 -0)➕
comfy_kitchen/backends/cuda/sage_attention/quant_qk_int8.cu(+1014 -0)➕
comfy_kitchen/backends/cuda/sage_attention/quant_v_int8.cu(+211 -0)➕
comfy_kitchen/backends/cuda/sage_attention/sage_attn_launcher.cu(+182 -0)➕
comfy_kitchen/sage_attention.py(+617 -0)➕
tests/test_int8_attention.py(+428 -0)📄 Description
Original code is based on sage attention but this is modified to try to get slightly higher performance while keeping similar quality on consumer GPUs.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.