Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG:API] /prompt/refine接口异常 #116

Closed
3 tasks done
tuxiaoseng opened this issue Jul 26, 2024 · 1 comment
Closed
3 tasks done

[BUG:API] /prompt/refine接口异常 #116

tuxiaoseng opened this issue Jul 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@tuxiaoseng
Copy link

确认清单

  • 我已经阅读过 README.md 和 dependencies.md 文件
  • 我已经确认之前没有 issue 或 discussion 涉及此 BUG
  • 我已经确认问题发生在最新代码或稳定版本中

Forge Commit 或者 Tag

Commits on Jul 26, 2024

Python 版本

1

PyTorch 版本

1

操作系统信息

linux

BUG 描述

异常

BUG 端点

1

复现参数

data = {
'text': 中华美食,作为世界饮食文化的瑰宝,以其丰富的种类、独特的风味和精湛的烹饪技艺而闻名于世。中国地大物博,各地区的饮食习惯和烹饪方法各具特色,形成了独树一帜的美食体系。从北方的京鲁菜、东北菜,到南方的粤菜、闽菜,无不展现出中华美食的多样性,
'prompt': [oral_2][break_3][laugh_0],
"seed": -1,
"top_P": 0.7,
"top_K": 20,
"temperature": 0.000000001,
"repetition_penalty": 1,
"max_new_token": 384,
"normalize": True,
}

期望结果

返回数据

实际结果

修改后

错误信息

Traceback (most recent call last):
  File "/root/autodl-tmp/tts/ChatTTS-Forge/modules/api/impl/refiner_api.py", line 33, in refiner_prompt_post
    refined_text = refiner.refine_text(
  File "/root/autodl-tmp/tts/ChatTTS-Forge/venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/root/autodl-tmp/tts/ChatTTS-Forge/modules/refiner.py", line 26, in refine_text
    sentences = spliter.parse(text)
  File "/root/autodl-tmp/tts/ChatTTS-Forge/modules/core/tools/SentenceSplitter.py", line 35, in parse
    sentences = self.merge_text_by_threshold(sentences)
  File "/root/autodl-tmp/tts/ChatTTS-Forge/modules/core/tools/SentenceSplitter.py", line 48, in merge_text_by_threshold
    if self.len(temp_sentence) + self.len(sentence) < self.sentence_threshold:
  File "/root/autodl-tmp/tts/ChatTTS-Forge/modules/core/tools/SentenceSplitter.py", line 31, in len
    return len(self.tokenizer(text))
  File "/root/autodl-tmp/tts/ChatTTS-Forge/modules/core/tools/SentenceSplitter.py", line 10, in char_tokenizer
    return [ord(char) for char in text.split("")]
ValueError: empty separator
@tuxiaoseng tuxiaoseng added the bug Something isn't working label Jul 26, 2024
zhzLuke96 added a commit that referenced this issue Jul 27, 2024
@zhzLuke96
Copy link
Member

fixed 86ae55a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants