feat: enable more workers in api.py
#621
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Is this PR adding new feature or fix a BUG?
Add feature / Fix BUG.
----
python -m tools.api --compile --workers 4
use_memory_cache
to the request parameter of post_api. Ifuse_memory_cache
is set toon-demand
, then the cache will always be used after the first encoding, regardless of any subsequent reference audio. If you want to change the reference audio, you need to set it tonever
and then reassign the reference audio. Default valuenever
.----
python -m tools.api --compile --workers 4
use_memory_cache
的字段。若use_memory_cache
设置为on-demand
, 则第一次编码后会一直使用该缓存,无论后来是否有其他参考音频。如果要修改参考音频,则需要将其设置为never
后,重新指定参考音频。默认值never
.