From e65275cbc1234b9a630725d381fb3bf84f2da019 Mon Sep 17 00:00:00 2001 From: Ftps Date: Sat, 19 Aug 2023 22:14:41 +0900 Subject: [PATCH] fix onnx --- infer/modules/onnx/export.py | 1 - 1 file changed, 1 deletion(-) diff --git a/infer/modules/onnx/export.py b/infer/modules/onnx/export.py index e80384c..ed4a416 100644 --- a/infer/modules/onnx/export.py +++ b/infer/modules/onnx/export.py @@ -4,7 +4,6 @@ from infer.lib.infer_pack.models_onnx import SynthesizerTrnMsNSFsidM def export_onnx(ModelPath, ExportedPath): - global cpt cpt = torch.load(ModelPath, map_location="cpu") cpt["config"][-3] = cpt["weight"]["emb_g.weight"].shape[0] vec_channels = 256 if cpt.get("version", "v1") == "v1" else 768