Spaces:
Running
on
Zero
Running
on
Zero
dongyh20
commited on
Commit
·
0a95715
1
Parent(s):
48f0970
update space
Browse files- app.py +2 -1
- ola/CosyVoice_main/cosyvoice/cli/model.py +2 -1
app.py
CHANGED
@@ -12,10 +12,11 @@ os.environ['FORCE_NO_DOWNSAMPLE'] = '1'
|
|
12 |
os.environ['LOAD_VISION_EARLY'] = '1'
|
13 |
os.environ['SKIP_LOAD_VIT'] = '1'
|
14 |
|
15 |
-
os.environ["CUDA_LAUNCH_BLOCKING"]='1'
|
16 |
|
17 |
import gradio as gr
|
18 |
import torch
|
|
|
19 |
import re
|
20 |
from decord import VideoReader, cpu
|
21 |
from PIL import Image
|
|
|
12 |
os.environ['LOAD_VISION_EARLY'] = '1'
|
13 |
os.environ['SKIP_LOAD_VIT'] = '1'
|
14 |
|
15 |
+
# os.environ["CUDA_LAUNCH_BLOCKING"]='1'
|
16 |
|
17 |
import gradio as gr
|
18 |
import torch
|
19 |
+
print(torch.cuda.is_available())
|
20 |
import re
|
21 |
from decord import VideoReader, cpu
|
22 |
from PIL import Image
|
ola/CosyVoice_main/cosyvoice/cli/model.py
CHANGED
@@ -57,7 +57,8 @@ class CosyVoiceModel:
|
|
57 |
# rtf and decoding related
|
58 |
self.stream_scale_factor = 1
|
59 |
assert self.stream_scale_factor >= 1, 'stream_scale_factor should be greater than 1, change it according to your actual rtf'
|
60 |
-
self.llm_context = torch.cuda.stream(torch.cuda.Stream(self.device))
|
|
|
61 |
self.lock = threading.Lock()
|
62 |
# dict used to store session related variable
|
63 |
self.tts_speech_token_dict = {}
|
|
|
57 |
# rtf and decoding related
|
58 |
self.stream_scale_factor = 1
|
59 |
assert self.stream_scale_factor >= 1, 'stream_scale_factor should be greater than 1, change it according to your actual rtf'
|
60 |
+
# self.llm_context = torch.cuda.stream(torch.cuda.Stream(self.device)) if torch.cuda.is_available() else nullcontext()
|
61 |
+
self.llm_context = nullcontext()
|
62 |
self.lock = threading.Lock()
|
63 |
# dict used to store session related variable
|
64 |
self.tts_speech_token_dict = {}
|