[diffusion] feat: support SageSparseLinearAttention attention backend (#17399)
This commit is contained in:
@@ -243,6 +243,9 @@ class CudaPlatformBase(Platform):
|
||||
elif selected_backend == AttentionBackendEnum.SLA_ATTN:
|
||||
logger.info("Using Sparse Linear Attention backend")
|
||||
return "sglang.multimodal_gen.runtime.layers.attention.backends.sparse_linear_attn.SparseLinearAttentionBackend"
|
||||
elif selected_backend == AttentionBackendEnum.SAGE_SLA_ATTN:
|
||||
logger.info("Using Sage Sparse Linear Attention backend")
|
||||
return "sglang.multimodal_gen.runtime.layers.attention.backends.sparse_linear_attn.SageSparseLinearAttentionBackend"
|
||||
elif selected_backend in [
|
||||
AttentionBackendEnum.FA,
|
||||
]:
|
||||
|
||||
@@ -34,6 +34,7 @@ class AttentionBackendEnum(enum.Enum):
|
||||
VMOBA_ATTN = enum.auto()
|
||||
AITER = enum.auto()
|
||||
SLA_ATTN = enum.auto()
|
||||
SAGE_SLA_ATTN = enum.auto()
|
||||
NO_ATTENTION = enum.auto()
|
||||
|
||||
def __str__(self):
|
||||
|
||||
Reference in New Issue
Block a user