-
Notifications
You must be signed in to change notification settings - Fork 281
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
中文提示词翻译模型使用CPU推理的方法 #33
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
demo内置的翻译模块大约消耗4G显存,如果需要使用使用CPU推理,因官方尚未支持,需要手动修改modelscope中翻译模块的推理代码,通常位于如下类似位置(仅举例):
/home/username/anaconda3/envs/anytext/lib/python3.10/site-packages/modelscope/pipelines/nlp/translation_pipeline.py
然后在TranslationPipeline的__init__()函数中添加如下代码:
The text was updated successfully, but these errors were encountered: