flash and sage

This commit is contained in:
spawner 2025-05-19 15:34:50 +08:00 committed by GitHub
parent d88f325f32
commit df925305e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -955,6 +955,11 @@ def cast_to_device(tensor, device, dtype, copy=False):
else:
return tensor.to(device, dtype, copy=copy, non_blocking=non_blocking)
def sage_attention_enabled():
return args.use_sage_attention
def flash_attention_enabled():
return args.use_flash_attention
def xformers_enabled():
global directml_enabled