We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
demo内置的翻译模块大约消耗4G显存,如果需要使用使用CPU推理,因官方尚未支持,需要手动修改modelscope中翻译模块的推理代码,通常位于如下类似位置(仅举例): /home/username/anaconda3/envs/anytext/lib/python3.10/site-packages/modelscope/pipelines/nlp/translation_pipeline.py 然后在TranslationPipeline的__init__()函数中添加如下代码:
/home/username/anaconda3/envs/anytext/lib/python3.10/site-packages/modelscope/pipelines/nlp/translation_pipeline.py
... tf_config.gpu_options.allow_growth = True tf_config.device_count['GPU'] = 0 # <-- add here! self._session = tf.Session(config=tf_config) ...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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: