Open cushycrux opened 3 months ago
Thanks for the bug report, I will investigate!
Win10 / RTX3070 Tested with onnxruntime 1.17.1. It's is rock stable for over 2 hours with a context_length of 7360 (config.yml). But this messages appears on start:
2024-07-02 18:06:04.6651086 [W:onnxruntime:, graph.cc:3593 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer '620'. It is not used by any node and should be removed from the model.
2024-07-02 18:06:04.6692734 [W:onnxruntime:, graph.cc:3593 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer '623'. It is not used by any node and should be removed from the model.
2024-07-02 18:06:04.6734261 [W:onnxruntime:, graph.cc:3593 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer '625'. It is not used by any node and should be removed from the model.
2024-07-02 18:06:04.6778254 [W:onnxruntime:, graph.cc:3593 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer '629'. It is not used by any node and should be removed from the model.
2024-07-02 18:06:04.6818256 [W:onnxruntime:, graph.cc:3593 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer '628'. It is not used by any node and should be removed from the model.
2024-07-02 18:06:04.6858567 [W:onnxruntime:, graph.cc:3593 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer '131'. It is not used by any node and should be removed from the model.
2024-07-02 18:06:04.6898914 [W:onnxruntime:, graph.cc:3593 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer '134'. It is not used by any node and should be removed from the model.
2024-07-02 18:06:04.6943196 [W:onnxruntime:, graph.cc:3593 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer '136'. It is not used by any node and should be removed from the model.
2024-07-02 18:06:04.6983800 [W:onnxruntime:, graph.cc:3593 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer '140'. It is not used by any node and should be removed from the model.
2024-07-02 18:06:04.7023939 [W:onnxruntime:, graph.cc:3593 onnxruntime::Graph::CleanUnusedInitializersAndNodeArgs] Removing initializer '139'. It is not used by any node and should be removed from the model.
Wiil test multi voices with speaker_id tomorrow. They crashed almost immediately after starting the app before onnx downgrading.
Great!
I can live with some weird logging message in exchange for a stable system. Make a Pull Request, so you get credit for the fix!
After testing almost 4 hours of piper voices and a wide variation of speaker id's-> https://rhasspy.github.io/piper-samples/ i can say it's 100% stable with onnxruntime 1.17.1.
One Question David, did you use piper to train the voice?
Next task for me would be to find out how to convert pth voices to onnx (which we can do with https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI). The problem is, piper doesn't accept the format, and the Json is missing. So, i have no idea.
Also I don't understand how to "pull request" (looks very complicated). but I don't need any credits at all anyway. So I am fine.
Yes, but it was a while ago. Make the PR for the fix, so you get credit.
I'll try and find the code that does the conversion m
I think its roughly:
import torch
voice_model = torch.jit.load("models/glados.pt")
input_tensor = torch.randint(low=0, high=135, size=(1, 50))
voice_model = torch.jit.trace(voice_model, input_tensor)
output_tensor = voice_model(input_tensor)
output_tensor_values = list(output_tensor.values()) # Extract tensor values from ScriptObject
print()
print(output_tensor.keys())
input_names = ["input"]
output_names = ["output"]
torch.onnx.export(
voice_model,
input_tensor,
"glados.onnx",
input_names=input_names,
output_names=output_names, verbose=True)
But it was a while ago! If that doesn't work, let me know and I will dig up and publish the full conversion code, from samples to a final model. Again, I prefer not to use Piper, as its a level of abstraction that's not particularly useful.
in regards to this crash, that happens with other ai voices:
I found this hint: just encountered the same issue a downgrade to the 1.17.1 for me resolved this issue seems to be a bug in the 1.18 version Source: https://github.com/rhasspy/piper/issues/520