netease-youdao / EmotiVoice

EmotiVoice 😊: a Multi-Voice and Prompt-Controlled TTS Engine
Apache License 2.0
6.63k stars 556 forks source link

推理时切换为自己训练的model,遇到了张量不统一的情况 #95

Closed SongDI911 closed 6 months ago

SongDI911 commented 6 months ago

Traceback (most recent call last): File "/data1/gxs/conda/envs/EmotiVoice/lib/python3.10/site-packages/streamlit/runtime/caching/cache_utils.py", line 264, in _get_or_create_cached_value cached_result = cache.read_result(value_key) File "/data1/gxs/conda/envs/EmotiVoice/lib/python3.10/site-packages/streamlit/runtime/caching/cache_resource_api.py", line 500, in read_result raise CacheKeyNotFoundError() streamlit.runtime.caching.cache_errors.CacheKeyNotFoundError

size mismatch for am.spk_tokenizer.weight: copying a param with shape torch.Size([2015, 384]) from checkpoint, the shape in current model is torch.Size([2014, 384])

使用样例的训练集训练出来的模型,使用inference_am_vocoder_exp.py是可以推理的,当我修改demo_page.py的am_checkpoint_path地址时报错了

syq163 commented 6 months ago

I guess the issue you are experiencing might be due to a configuration mismatch. I suggest referring to the demo_page_databaker.py file for possible solutions.

SongDI911 commented 6 months ago

Thank you very much for your prompt response to my question, I found the solution from demo_page_databaker.py