Spaces:
Running
on
Zero
Running
on
Zero
gokaygokay
commited on
Commit
•
aaad843
1
Parent(s):
b5b4980
Update caption_models.py
Browse files- caption_models.py +3 -0
caption_models.py
CHANGED
@@ -6,6 +6,9 @@ from qwen_vl_utils import process_vision_info
|
|
6 |
import numpy as np
|
7 |
import os
|
8 |
from datetime import datetime
|
|
|
|
|
|
|
9 |
|
10 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
11 |
|
|
|
6 |
import numpy as np
|
7 |
import os
|
8 |
from datetime import datetime
|
9 |
+
import subprocess
|
10 |
+
|
11 |
+
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
12 |
|
13 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
14 |
|