1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

Add: --use-sage-attention to enable SageAttention.

You need to have the library installed first.
This commit is contained in:
comfyanonymous
2024-12-18 01:56:10 -05:00
parent a4f59bc65e
commit 37e5390f5f
3 changed files with 45 additions and 5 deletions

View File

@@ -837,6 +837,8 @@ def cast_to_device(tensor, device, dtype, copy=False):
non_blocking = device_supports_non_blocking(device)
return cast_to(tensor, dtype=dtype, device=device, non_blocking=non_blocking, copy=copy)
def sage_attention_enabled():
return args.use_sage_attention
def xformers_enabled():
global directml_enabled