Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
MinerU
Commits
168a1115
Unverified
Commit
168a1115
authored
Dec 11, 2024
by
Xiaomeng Zhao
Committed by
GitHub
Dec 11, 2024
Browse files
Merge pull request #1255 from myhloli/dev
build(deps): update torch and torchvision version requirements
parents
fdf15a45
9a96362d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
docs/README_Windows_CUDA_Acceleration_en_US.md
docs/README_Windows_CUDA_Acceleration_en_US.md
+1
-1
docs/README_Windows_CUDA_Acceleration_zh_CN.md
docs/README_Windows_CUDA_Acceleration_zh_CN.md
+1
-1
setup.py
setup.py
+3
-1
No files found.
docs/README_Windows_CUDA_Acceleration_en_US.md
View file @
168a1115
...
...
@@ -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.
...
...
docs/README_Windows_CUDA_Acceleration_zh_CN.md
View file @
168a1115
...
...
@@ -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"的值**
...
...
setup.py
View file @
168a1115
...
...
@@ -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,公式检测
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment