vall-e
vall-e copied to clipboard
torch.load() returned a dict when inference
when run inference code, loading the model, but torch.load() returned a dict get error:
File "vall-e/vall_e/main.py", line 30, in main ar = torch.load(args.ar_ckpt).to(args.device) AttributeError: 'dict' object has no attribute 'to'
I trained 10 samples to generate the same error in the audio times. python -m vall_e 'welcome' ref_path/2.wav out_path/2.wav --ar-ckpt ckpts/test/ar/model/default/mp_rank_00_model_states.pt
I am receiving the same error
You need to export your freshly trained models first, then the error is gone!
For example:
python3 -m vall_e.export ~/vall-e/ckpts/LJSpeech-1.1/ar/model/default/mp_rank_00_model_states.pt yaml=config/LJSpeech-1.1/ar.yml
python3 -m vall_e.export ~/vall-e/ckpts/LJSpeech-1.1/nar/model/default/mp_rank_00_model_states.pt yaml=config/LJSpeech-1.1/nar.yml