-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[fast_inference] Make API Great Again And Again #923
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
[fast_inference] Make API Great Again And Again #923
Conversation
WebAPI文档
执行参数:
调用:推理endpoint:
POST: {
"text": "", # str.(required) text to be synthesized
"text_lang": "", # str.(required) language of the text to be synthesized
"ref_audio_path": "", # str.(required) reference audio path.
"prompt_text": "", # str.(optional) prompt text for the reference audio
"prompt_lang": "", # str.(required) language of the prompt text for the reference audio
"top_k": 5, # int.(optional) top k sampling
"top_p": 1, # float.(optional) top p sampling
"temperature": 1, # float.(optional) temperature for sampling
"text_split_method": "cut5", # str.(optional) text split method, see text_segmentation_method.py for details.
"batch_size": 1, # int.(optional) batch size for inference
"batch_threshold": 0.75, # float.(optional) threshold for batch splitting.
"split_bucket": true, # bool.(optional) whether to split the batch into multiple buckets.
"speed_factor":1.0, # float.(optional) control the speed of the synthesized audio.
"fragment_interval":0.3, # float.(optional) to control the interval of the audio fragment.
"seed": -1, # int.(optional) random seed for reproducibility.
"media_type": "wav", # str.(optional) media type of the output audio, support "wav", "raw", "ogg", "aac".
"streaming_mode": false, # bool.(optional) whether to return a streaming response.
} RESP: 命令控制endpoint: command: GET:
POST: {
"command": "restart"
} RESP: 无 切换GPT模型endpoint: GET:
RESP: 切换Sovits模型endpoint: GET:
RESP: |
不考虑开放通过启动参数调整workers吗?(这对同时处理多个请求有帮助) |
我刚刚试了,多workers似乎会有问题(直接给我整卡死了😂 |
奇怪了,我这边一切正常,不过每增加一个worker内存显存消耗就会增加一倍,是不是开太多了? |
有可能,我开了4个worker,占用了10G+内存 |
这样的设置需要32G内存和推荐16G显存,不够的话必掉速,如果显卡不是特别强的话开多了提升不会太明显,我这边也是开4个worker,完成同一任务从29s缩短到12s |
更新如下
状态