github woct0rdho/SageAttention v2.2.0-windows.post4

latest release: v2.2.0-windows.post5
9 months ago

A big change in this version is that it supports torch.compile, see thu-ml#218 . Previously SageAttention must be put inside torch.compiler.disable and cause a graph break, now it's no longer the case.

To enable full graph compilation in ComfyUI, choose allow_compile in PatchSageAttentionKJ (or sageattn_compiled in WanVideoModelLoader), and choose fullgraph in TorchCompileModelAdvanced (or WanVideoTorchCompileSettings).

Note that we only recommend to apply 'full graph compilation' to transformer blocks, and treat each block as a 'full graph'. The TorchCompileModel node in native ComfyUI usually fails, because it tries to compile the whole model pipeline rather than the blocks.

There are reports that full graph compilation solves some black/noise outputs and lowers VRAM usage. However, it can fail or the compiling time can be very slow, if it's not correctly configured or it's applied to some complicated models. There are also reports that it causes some new black/noise outputs. Developers from multiple projects, including PyTorch, Triton, SageAttention, ComfyUI, Kijai and other custom nodes, are still working to make it easier.

Recently ComfyUI introduced comfy-aimdo but it breaks full graph compilation. You may disable it with --disable-dynamic-vram when starting ComfyUI.

If full graph compilation fails, you can still use this version of SageAttention without it.


Another change is that along with ABI3, it uses libtorch stable ABI. There is torch2.9.0andhigher in the filename (I hope we can come up with a better name scheme), so the wheel supports PyTorch >= 2.9 . Note again that cp39-abi3 means it uses Python ABI3 and supports all Python versions >= 3.9 .

Don't miss a new SageAttention release

NewReleases is sending notifications on new releases.