wenet-e2e / wetts

Production First and Production Ready End-to-End Text-to-Speech Toolkit
Apache License 2.0
356 stars 56 forks source link

terminate called after throwing an instance of 'Ort::Exception' #185

Open lfgogogo opened 6 months ago

lfgogogo commented 6 months ago

Describe the bug When i try to use runtime/onnxrutime to infer,i get error below: terminate called after throwing an instance of 'Ort::Exception' what(): Non-zero status code returned while running Gather node. Name:'Gather_299' Status Message:/onnxruntime_src/include/onnxruntime/core/framework/op_kernel_context.h:40 const T* onnxruntime::OpKernelContext::Input(int) const [with T = onnxruntime::Tensor] Missing Input: sid

And i find the error happens in gwp_prosody.cc,line 107: ![Uploading image.png…]()

To Reproduce Steps to reproduce the behavior:

  1. Train vits model using baker,config as blow:
    {
    "train": {
    "log_interval": 200,
    "eval_interval": 1000,
    "seed": 1234,
    "epochs": 20000,
    "learning_rate": 2e-4,
    "betas": [0.8, 0.99],
    "eps": 1e-9,
    "batch_size": 32,
    "fp16_run": false,
    "lr_decay": 0.999875,
    "segment_size": 8192,
    "init_lr_ratio": 1,
    "warmup_epochs": 0,
    "c_mel": 45,
    "c_kl": 1.0
    },
    "data": {
    "max_wav_value": 32768.0,
    "sampling_rate": 16000,
    "filter_length": 1024,
    "hop_length": 256,
    "win_length": 1024,
    "n_mel_channels": 80,
    "mel_fmin": 0.0,
    "mel_fmax": null
    },
    "model": {
    "inter_channels": 96,
    "hidden_channels": 96,
    "filter_channels":384,
    "n_heads": 2,
    "n_layers": 5,
    "kernel_size": 3,
    "p_dropout": 0.1,
    "resblock": "1",
    "upsample_rates": [8,8,2,2],
    "upsample_kernel_sizes": [16,16,4,4],
    "upsample_initial_channel":384,
    "resblock_kernel_sizes": [3,7,11],
    "resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]],
    "n_layers_q": 3,
    "use_spectral_norm": false,
    "gin_channels": 256,
    "use_sdp": false
    }
    }
  2. Compile the runtime code and run it.
Shengqiang-Li commented 5 months ago

We have fixed the bug in the inference of the onnxrutime, please update the code and try again