Skip to content

Commit 0b75c3a

Browse files
committed
update
1 parent 43f9e9a commit 0b75c3a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cosyvoice/cli/model.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ def load_trt(self, flow_decoder_estimator_model, flow_decoder_onnx_model, fp16):
8787
assert torch.cuda.is_available(), 'tensorrt only supports gpu!'
8888
if not os.path.exists(flow_decoder_estimator_model):
8989
convert_onnx_to_trt(flow_decoder_estimator_model, flow_decoder_onnx_model, fp16)
90+
if os.path.getsize(flow_decoder_estimator_model) == 0:
91+
raise ValueError('{} is empty file, delete it and export again!'.format(flow_decoder_estimator_model))
9092
del self.flow.decoder.estimator
9193
import tensorrt as trt
9294
with open(flow_decoder_estimator_model, 'rb') as f:

0 commit comments

Comments
 (0)