littlebird13 commited on
Commit
6453bfe
·
verified ·
1 Parent(s): 9921fc6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,7 +2,7 @@
2
  # Qwen3-TTS Gradio Demo for HuggingFace Spaces with Zero GPU
3
  # Supports: Voice Design, Voice Clone (Base), TTS (CustomVoice)
4
  import subprocess
5
- subprocess.run('pip install flash-attn --no-build-isolation', shell=True)
6
  import os
7
  import spaces
8
  import gradio as gr
@@ -38,7 +38,7 @@ def get_model(model_type: str, model_size: str):
38
  device_map="cuda",
39
  dtype=torch.bfloat16,
40
  token=HF_TOKEN,
41
- attn_implementation="flash_attention_2",
42
  )
43
  return loaded_models[key]
44
 
 
2
  # Qwen3-TTS Gradio Demo for HuggingFace Spaces with Zero GPU
3
  # Supports: Voice Design, Voice Clone (Base), TTS (CustomVoice)
4
  import subprocess
5
+ subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
6
  import os
7
  import spaces
8
  import gradio as gr
 
38
  device_map="cuda",
39
  dtype=torch.bfloat16,
40
  token=HF_TOKEN,
41
+ # attn_implementation="flash_attention_2",
42
  )
43
  return loaded_models[key]
44