Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

导出ONNX格式时报错 #1030

Open
Sunnycl opened this issue Mar 3, 2025 · 1 comment
Open

导出ONNX格式时报错 #1030

Sunnycl opened this issue Mar 3, 2025 · 1 comment

Comments

@Sunnycl
Copy link

Sunnycl commented Mar 3, 2025

运行命令:
python cosyvoice/bin/export_onnx.py --model_dir pretrained_models/CosyVoice2-0.5B

报错内容:
Traceback (most recent call last):
File "/Projects/TTS_metric/CosyVoice/cosyvoice/bin/export_onnx.py", line 116, in
main()
File "/Projects/TTS_metric/CosyVoice/cosyvoice/bin/export_onnx.py", line 112, in main
torch.testing.assert_allclose(output_pytorch, torch.from_numpy(output_onnx).to(device), rtol=1e-2, atol=1e-4)
File "/home/miniconda3/envs/tts2/lib/python3.10/site-packages/torch/testing/_comparison.py", line 1565, in assert_allclose
torch.testing.assert_close(
File "/home/miniconda3/envs/tts2/lib/python3.10/site-packages/torch/testing/_comparison.py", line 1523, in assert_close
raise error_metas[0].to_error(msg)
AssertionError: Tensor-likes are not close!

Mismatched elements: 3220 / 71200 (4.5%)
Greatest absolute difference: 0.028653383255004883 at index (0, 79, 2) (up to 0.0001 allowed)
Greatest relative difference: 49.96367645263672 at index (1, 17, 89) (up to 0.01 allowed)

@yuehaotian-gpt
Copy link

我也遇到了同样的问题 ,请问目前解决了么

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants