Skip to content

加载 speaker embedding 出错 #46

Description

@Jackxiini
WARNING:chattts_plus.models.llama:We detected that you are passing `past_key_values` as a tuple and this is deprecated and will be removed in v4.43. Please use an appropriate `Cache` class (https://huggingface.co/docs/transformers/v4.41.3/en/internal/generation_utils#transformers.Cache)
text:  18%|██████████████                                                              | 71/384(max) [00:01, 43.15it/s]
INFO:ChatTTSPlusPipeline:Refine text:                                                  | 69/384(max) [00:01, 55.49it/s]
INFO:ChatTTSPlusPipeline:['正 式 而 成 立 者 , 立 宪 之 国 家 , 宪 法 为 人 民 所 订 定  。']
100%|████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00,  1.70s/it]
INFO:ChatTTSPlusPipeline:loading speaker_emb from E:\Code\AudioLLM\ChatTTSPlus-copy\assets\speakers\2222.pt
WARNING:ChatTTSPlusPipeline:加载 speaker embedding 时出错: 加载的 speaker embedding 不是 tensor 类型: <class 'str'>
WARNING:ChatTTSPlusPipeline:使用空的 speaker embedding
Traceback (most recent call last):
  File "E:\Code\AudioLLM\py310env\lib\site-packages\gradio\queueing.py", line 625, in process_events
    response = await route_utils.call_process_api(
  File "E:\Code\AudioLLM\py310env\lib\site-packages\gradio\route_utils.py", line 322, in call_process_api
    output = await app.get_blocks().process_api(
  File "E:\Code\AudioLLM\py310env\lib\site-packages\gradio\blocks.py", line 2103, in process_api
    result = await self.call_function(
  File "E:\Code\AudioLLM\py310env\lib\site-packages\gradio\blocks.py", line 1662, in call_function
    prediction = await utils.async_iteration(iterator)
  File "E:\Code\AudioLLM\py310env\lib\site-packages\gradio\utils.py", line 735, in async_iteration
    return await anext(iterator)
  File "E:\Code\AudioLLM\py310env\lib\site-packages\gradio\utils.py", line 729, in __anext__
    return await anyio.to_thread.run_sync(
  File "E:\Code\AudioLLM\py310env\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "E:\Code\AudioLLM\py310env\lib\site-packages\anyio\_backends\_asyncio.py", line 2470, in run_sync_in_worker_thread
    return await future
  File "E:\Code\AudioLLM\py310env\lib\site-packages\anyio\_backends\_asyncio.py", line 967, in run
    result = context.run(func, *args)
  File "E:\Code\AudioLLM\py310env\lib\site-packages\gradio\utils.py", line 712, in run_sync_iterator_async
    return next(iterator)
  File "E:\Code\AudioLLM\py310env\lib\site-packages\gradio\utils.py", line 873, in gen_wrapper
    response = next(iterator)
  File "E:\Code\AudioLLM\ChatTTSPlus-copy\webui.py", line 149, in generate_audio
    wav_gen = pipe.infer(
  File "E:\Code\AudioLLM\py310env\lib\site-packages\torch\utils\_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "E:\Code\AudioLLM\ChatTTSPlus-copy\chattts_plus\pipelines\chattts_plus_pipeline.py", line 543, in infer
    speaker_emb = torch.zeros((1, self.cfg.spk_emb_dim),
  File "E:\Code\AudioLLM\py310env\lib\site-packages\omegaconf\dictconfig.py", line 355, in __getattr__
    self._format_and_raise(
  File "E:\Code\AudioLLM\py310env\lib\site-packages\omegaconf\base.py", line 231, in _format_and_raise
    format_and_raise(
  File "E:\Code\AudioLLM\py310env\lib\site-packages\omegaconf\_utils.py", line 899, in format_and_raise
    _raise(ex, cause)
  File "E:\Code\AudioLLM\py310env\lib\site-packages\omegaconf\_utils.py", line 797, in _raise
    raise ex.with_traceback(sys.exc_info()[2])  # set env var OC_CAUSE=1 for full trace
  File "E:\Code\AudioLLM\py310env\lib\site-packages\omegaconf\dictconfig.py", line 351, in __getattr__
    return self._get_impl(
  File "E:\Code\AudioLLM\py310env\lib\site-packages\omegaconf\dictconfig.py", line 442, in _get_impl
    node = self._get_child(
  File "E:\Code\AudioLLM\py310env\lib\site-packages\omegaconf\basecontainer.py", line 73, in _get_child
    child = self._get_node(
  File "E:\Code\AudioLLM\py310env\lib\site-packages\omegaconf\dictconfig.py", line 480, in _get_node
    raise ConfigKeyError(f"Missing key {key!s}")
omegaconf.errors.ConfigAttributeError: Missing key spk_emb_dim
    full_key: spk_emb_dim
    object_type=dict

感谢你的训练代码!我在使用你的代码在WebUI里用你的 2222.pt (包括使用自己训练的speaker embedding)时出了以上的报错,一直没能改通,请问可以看一下吗

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions