ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Add support for sage attention 3 in comfyui, enable via new cli arg

Open mengqin opened this issue 3 weeks ago • 3 comments

This is basic Sage Attention 3 support. Because it is still unstable and differs significantly from previous versions of Sage Attention, a separate switch --use-sage-attiention3 is provided to enable or disable it. You need to install Sage Attention 3 in your environment before enabling it.

mengqin avatar Dec 01 '25 18:12 mengqin

@mengqin for this PR, could you remove the startup argument for sage3? sage3 is very lossy, so after this PR gets merged with that gone, we can create a node that will only apply sage3 to certain blocks + sampling steps to make the results much better.

we would want to avoid users turning on sage3 for everything, as that will basically make everything return very poor results.

Kosinkadink avatar Dec 11 '25 02:12 Kosinkadink

@mengqin for this PR, could you remove the startup argument for sage3? sage3 is very lossy, so after this PR gets merged with that gone, we can create a node that will only apply sage3 to certain blocks + sampling steps to make the results much better.

we would want to avoid users turning on sage3 for everything, as that will basically make everything return very poor results.

Thanks for the review. I removed the command-line argument switch and only kept the relevant attention functions and their registrations.

mengqin avatar Dec 11 '25 22:12 mengqin

Sorry for late reply, looks good! I will merge this in after the release of the next stable version, in 24-48 hours-ish.

Kosinkadink avatar Dec 16 '25 00:12 Kosinkadink