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

对于12.3版本的CUDA是否有支持的Pytorch和Tensorflow版本? #66

Open
Rinnolo opened this issue Oct 21, 2024 · 3 comments
Open

Comments

@Rinnolo
Copy link

Rinnolo commented Oct 21, 2024

现在安装的版本Pytorch=2.4.0,Tensorflow=2.16.1,测试均可使用CUDA但是运行时会报错:

Traceback (most recent call last):
  File "/home/llh/Projects/MobileAgent/Mobile-Agent-v2/run.py", line 260, in <module>
    ocr_detection = pipeline(Tasks.ocr_detection, model='/home/llh/Models/cv_resnet18_ocr-detection-line-level_damo')
  File "/home/llh/miniconda3/envs/mobileagent/lib/python3.9/site-packages/modelscope/pipelines/builder.py", line 170, in pipeline
    return build_pipeline(cfg, task_name=task)
  File "/home/llh/miniconda3/envs/mobileagent/lib/python3.9/site-packages/modelscope/pipelines/builder.py", line 65, in build_pipeline
    return build_from_cfg(
  File "/home/llh/miniconda3/envs/mobileagent/lib/python3.9/site-packages/modelscope/utils/registry.py", line 215, in build_from_cfg
    raise type(e)(f'{obj_cls.__name__}: {e}')
AttributeError: OCRDetectionPipeline: module 'tensorflow._api.v2.compat.v2.__internal__' has no attribute 'register_load_context_function'

这边感觉应该是Tensorflow版本太高的原因,但是降级Tensorflow会导致CUDA不可用,因此在不降级CUDA的情况下是否有支持的版本?
requirements.txt中的Tensorflow=2.9.0或之前的issue中的Tensorflow=2.13.0均无法使用CUDA。

@junyangwang0410
Copy link
Collaborator

这个问题我们也发现了,当前使用的模型依赖于老版本,但是我们实测这个模型效果更好。你也可以替换成其他的OCR模型

@Rinnolo
Copy link
Author

Rinnolo commented Oct 21, 2024

这个问题我们也发现了,当前使用的模型依赖于老版本,但是我们实测这个模型效果更好。你也可以替换成其他的OCR模型

明白了 ;(
请问模型支持到的Tensorflow最高的版本是多少?是2.13.0吗?我根据最高支持版本微调一下环境试试看。

@junyangwang0410
Copy link
Collaborator

我这边测试就是2.9.0,再高了就会报错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants