babysor / babysor/MockingBird

使用hifigan_24k报错 KeyError: 'model_state'

Open
#521 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
36.9k
Forks
5.2k
PR merge metrics
No merged PRs in 30d

Description

**Summary[问题简述(一句话)]**
Vocoder使用hifigan_24k报错 KeyError: 'model_state',输出为杂音。使用pretrained或g_hifigan则正常。

**Env & To Reproduce[复现与环境]**
模型从readme的百度网盘下载
版本为最新的main分支。
从百度网盘下载模型放入对应目录后,vocoder选择hifigan_24k的时候就会报错。但是点击生成仍然可以正常运行,只是出来的都是杂音。

**Screenshots[截图(如有)]**
```
Traceback (most recent call last):
File "/Users/xxx/Files/MockingBird/toolbox/__init__.py", line 467, in init_vocoder
vocoder.load_model(model_fpath, model_config_fpath)
File "/Users/xxx/Files/MockingBird/vocoder/wavernn/inference.py", line 37, in load_model
_model.load_state_dict(checkpoint['model_state'])
KeyError: 'model_state'
```

![image](https://user-images.githubusercontent.com/20398519/165456129-295f6b4b-6d29-4377-8229-9f0ca60bfdec.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in toolbox/__init__.py at init_vocoder and then read vocoder/wavernn/inference.py, especially load_model where checkpoint['model_state'] is accessed. Compare the hifigan_24k model downloaded from the README with the working pretrained or g_hifigan models. Done means hifigan_24k loads without the KeyError and generated audio is no longer noise.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.