PaddleOCR icon indicating copy to clipboard operation
PaddleOCR copied to clipboard

use PaddleOCRVL dtype not match

Open renoyuan opened this issue 2 months ago • 3 comments

🔎 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")

renoyuan avatar Oct 20 '25 03:10 renoyuan

PaddleOCR-VL has a minimum requirement for the compute capacity of GPUs. Please check the documentation for more details.

Bobholamovic avatar Oct 20 '25 04:10 Bobholamovic

直接转换成paddle.float32 value=value.astype(paddle.float32)

flowcloudzhao avatar Oct 22 '25 07:10 flowcloudzhao

We are working on this. This will be fixed within this week.

Bobholamovic avatar Oct 23 '25 14:10 Bobholamovic

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

TingquanGao avatar Nov 24 '25 03:11 TingquanGao