diff --git a/docs/README_Windows_CUDA_Acceleration_en_US.md b/docs/README_Windows_CUDA_Acceleration_en_US.md index e8252145..7aa96990 100644 --- a/docs/README_Windows_CUDA_Acceleration_en_US.md +++ b/docs/README_Windows_CUDA_Acceleration_en_US.md @@ -65,7 +65,7 @@ If your graphics card has at least 8GB of VRAM, follow these steps to test CUDA- 1. **Overwrite the installation of torch and torchvision** supporting CUDA. ``` - pip install --force-reinstall torch torchvision --index-url https://download.pytorch.org/whl/cu118 + pip install --force-reinstall torch==2.3.1 torchvision==0.18.1 --index-url https://download.pytorch.org/whl/cu118 ``` 2. **Modify the value of `"device-mode"`** in the `magic-pdf.json` configuration file located in your user directory. diff --git a/docs/README_Windows_CUDA_Acceleration_zh_CN.md b/docs/README_Windows_CUDA_Acceleration_zh_CN.md index 0b156994..dcdb71ee 100644 --- a/docs/README_Windows_CUDA_Acceleration_zh_CN.md +++ b/docs/README_Windows_CUDA_Acceleration_zh_CN.md @@ -66,7 +66,7 @@ pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com -i h **1.覆盖安装支持cuda的torch和torchvision** ```bash -pip install --force-reinstall torch torchvision --index-url https://download.pytorch.org/whl/cu118 +pip install --force-reinstall torch==2.3.1 torchvision==0.18.1 --index-url https://download.pytorch.org/whl/cu118 ``` **2.修改【用户目录】中配置文件magic-pdf.json中"device-mode"的值** diff --git a/setup.py b/setup.py index a1f84a0e..aaa4c1b3 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,9 @@ if __name__ == '__main__': "paddlepaddle==3.0.0b1;platform_system=='Linux'", "paddlepaddle==2.6.1;platform_system=='Windows' or platform_system=='Darwin'", ], - "full": ["unimernet==0.2.2", # unimernet升级0.2.1 + "full": ["unimernet==0.2.2", # unimernet升级0.2.2,移除torchtext的依赖 + "torch>=2.2.2,<=2.3.1", # torch2.4.0及之后版本未测试,先卡住版本上限 + "torchvision>=0.17.2,<=0.18.1", # torchvision 受torch版本约束 "matplotlib<=3.9.0;platform_system=='Windows'", # 3.9.1及之后不提供windows的预编译包,避免一些没有编译环境的windows设备安装失败 "matplotlib;platform_system=='Linux' or platform_system=='Darwin'", # linux 和 macos 不应限制matplotlib的最高版本,以避免无法更新导致的一些bug "ultralytics>=8.3.48", # yolov8,公式检测