mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-02-03 09:50:22 +00:00
Fix onnx export & Support TensorRT (#2384)
* Fix Onnx Export And Support TensorRT * Add files via upload
This commit is contained in:
committed by
GitHub
parent
9ae3af4a7d
commit
1376ce739d
@@ -2,7 +2,6 @@ import torch
|
||||
|
||||
from infer.lib.infer_pack.models_onnx import SynthesizerTrnMsNSFsidM
|
||||
|
||||
|
||||
def export_onnx(ModelPath, ExportedPath):
|
||||
cpt = torch.load(ModelPath, map_location="cpu")
|
||||
cpt["config"][-3] = cpt["weight"]["emb_g.weight"].shape[0]
|
||||
@@ -44,7 +43,7 @@ def export_onnx(ModelPath, ExportedPath):
|
||||
"rnd": [2],
|
||||
},
|
||||
do_constant_folding=False,
|
||||
opset_version=13,
|
||||
opset_version=18,
|
||||
verbose=False,
|
||||
input_names=input_names,
|
||||
output_names=output_names,
|
||||
|
||||
Reference in New Issue
Block a user