Skip to content

Commit 5788aa0

Browse files
authored
Update file_utils.py
reduce GPU memory cost
1 parent 7921181 commit 5788aa0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cosyvoice/utils/file_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def convert_onnx_to_trt(trt_model, onnx_model, fp16):
6161
network = builder.create_network(network_flags)
6262
parser = trt.OnnxParser(network, logger)
6363
config = builder.create_builder_config()
64-
config.set_memory_pool_limit(trt.MemoryPoolType.WORKSPACE, 1 << 33) # 8GB
64+
config.set_memory_pool_limit(trt.MemoryPoolType.WORKSPACE, 1 << 30) # 1GB
6565
if fp16:
6666
config.set_flag(trt.BuilderFlag.FP16)
6767
profile = builder.create_optimization_profile()

0 commit comments

Comments
 (0)