ChuxiJ commited on
Commit
b7a9cc9
·
1 Parent(s): 93cbbd1

fix is_flash_attention_available

Browse files
Files changed (1) hide show
  1. acestep/handler.py +7 -0
acestep/handler.py CHANGED
@@ -199,6 +199,13 @@ class AceStepHandler:
199
 
200
  return model_path
201
 
 
 
 
 
 
 
 
202
 
203
  def is_flash_attn3_available(self) -> bool:
204
  """Check if flash-attn3 via kernels library is available"""
 
199
 
200
  return model_path
201
 
202
+ def is_flash_attention_available(self) -> bool:
203
+ """Check if flash attention is available on the system"""
204
+ try:
205
+ import flash_attn
206
+ return True
207
+ except ImportError:
208
+ return False
209
 
210
  def is_flash_attn3_available(self) -> bool:
211
  """Check if flash-attn3 via kernels library is available"""