Ucas-HaoranWei / GOT-OCR2.0

Official code implementation of General OCR Theory: Towards OCR-2.0 via a Unified End-to-end Model
5.94k stars 507 forks source link

显存溢出 #8

Open renshujiajia opened 2 months ago

renshujiajia commented 2 months ago

运行python3 GOT/demo/run_ocr_2.0.py --model-name ./GOT_weights/ --image-file image/mapping.jpg --type ocr报错,看起来像是显存溢出?这个默认跑起来需要多大显存呢?能否配置

new_value = value.to(device)
RuntimeError: CUDA error: out of memory
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
Ucas-HaoranWei commented 2 months ago

你是什么显卡,from pretrain load模型的时候,device改成cpu试试

DAAworld commented 1 month ago

你是什么显卡,from pretrain load模型的时候,device改成cpu试试

4090 24G 显存可以跑嘛?

Ucas-HaoranWei commented 1 month ago

你是什么显卡,from pretrain load模型的时候,device改成cpu试试

4090 24G 显存可以跑嘛?

大于20G可以训练,inference 5G显存就能跑