Spaces:
Running
on
L4
Running
on
L4
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
@@ -25,6 +25,8 @@ if not vibevoice_dir.exists():
|
|
25 |
subprocess.run(['git', 'clone', 'https://github.com/microsoft/VibeVoice.git'], check=True)
|
26 |
print("Installing VibeVoice...")
|
27 |
subprocess.run(['pip', 'install', '-e', './VibeVoice'], check=True)
|
|
|
|
|
28 |
|
29 |
# Add the VibeVoice directory to path
|
30 |
import sys
|
@@ -113,7 +115,6 @@ class VibeVoiceChat:
|
|
113 |
self.model_path,
|
114 |
torch_dtype=torch.bfloat16,
|
115 |
device_map='cuda',
|
116 |
-
attn_implementation="flash_attention_2",
|
117 |
)
|
118 |
self.model.eval()
|
119 |
|
|
|
25 |
subprocess.run(['git', 'clone', 'https://github.com/microsoft/VibeVoice.git'], check=True)
|
26 |
print("Installing VibeVoice...")
|
27 |
subprocess.run(['pip', 'install', '-e', './VibeVoice'], check=True)
|
28 |
+
print("Installing flash-attn...")
|
29 |
+
subprocess.run(['pip', 'install', 'flash-attn', '--no-build-isolation'], check=True)
|
30 |
|
31 |
# Add the VibeVoice directory to path
|
32 |
import sys
|
|
|
115 |
self.model_path,
|
116 |
torch_dtype=torch.bfloat16,
|
117 |
device_map='cuda',
|
|
|
118 |
)
|
119 |
self.model.eval()
|
120 |
|