Spaces:
Running
on
Zero
Running
on
Zero
fix
Browse files- demo/infer.py +1 -0
demo/infer.py
CHANGED
@@ -36,6 +36,7 @@ class LiveCCDemoInfer:
|
|
36 |
|
37 |
@spaces.GPU
|
38 |
def __init__(self, model_path: str = None, device_id: int = 0):
|
|
|
39 |
self.model = Qwen2VLForConditionalGeneration.from_pretrained(
|
40 |
model_path, torch_dtype="auto",
|
41 |
# device_map=f'cuda:{device_id}',
|
|
|
36 |
|
37 |
@spaces.GPU
|
38 |
def __init__(self, model_path: str = None, device_id: int = 0):
|
39 |
+
os.system('pip install flash-attn --no-build-isolation')
|
40 |
self.model = Qwen2VLForConditionalGeneration.from_pretrained(
|
41 |
model_path, torch_dtype="auto",
|
42 |
# device_map=f'cuda:{device_id}',
|