use PaddleOCRVL dtype not match
🔎 Search before asking
- [x] I have searched the PaddleOCR Docs and found no similar bug report.
- [x] I have searched the PaddleOCR Issues and found no similar bug report.
- [x] I have searched the PaddleOCR Discussions and found no similar bug report.
🐛 Bug (问题描述)
AssertionError: Variable dtype not match, Variable [ linear_164.w_0 ] need tensor with dtype paddle.float32 but load tensor with dtype paddle.bfloat16 i try use gpu 2080 ti and cpu run ,but assert mistake.
🏃♂️ Environment (运行环境)
ubuntu 20 cuda 12.4 & cpu
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
from paddleocr import PaddleOCRVL
import paddle
pipeline = PaddleOCRVL(
device='cpu',
vl_rec_model_dir='./model'
)
output = pipeline.predict("./pp_ocr_vl_demo.png")
for res in output:
res.print()
res.save_to_json(save_path="output")
res.save_to_markdown(save_path="output")
PaddleOCR-VL has a minimum requirement for the compute capacity of GPUs. Please check the documentation for more details.
直接转换成paddle.float32 value=value.astype(paddle.float32)
We are working on this. This will be fixed within this week.
The issue has no response for a long time and will be closed. You can reopen or new another issue if are still confused.
From Bot