fixed a bug in ldm/pixart/blocks.py (#6158)

This commit is contained in:
zhangp365 2024-12-23 12:44:20 +08:00 committed by GitHub
parent 80f07952d2
commit f7d83b72e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,7 +12,7 @@ from comfy.ldm.modules.attention import optimized_attention
if model_management.xformers_enabled():
import xformers.ops
if int((xformers.__version__).split(".")[2]) >= 28:
if int((xformers.__version__).split(".")[2].split("+")[0]) >= 28:
block_diagonal_mask_from_seqlens = xformers.ops.fmha.attn_bias.BlockDiagonalMask.from_seqlens
else:
block_diagonal_mask_from_seqlens = xformers.ops.fmha.BlockDiagonalMask.from_seqlens