PaddleOCR icon indicating copy to clipboard operation
PaddleOCR copied to clipboard

PaddleOCR VL on macOS is trying to load bfloat16 weights into float32 tensors

Open hcodestack opened this issue 2 months ago • 2 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 (问题描述)

The issue is that PaddleOCR VL on macOS is trying to load bfloat16 weights into float32 tensors. This is a known compatibility issue. The model files were trained in bfloat16 but macOS/Apple Silicon may not fully support it.

now there's a dtype mismatch issue. The model was saved in bfloat16 but PaddlePaddle is trying to load it as float32. This is a compatibility issue with macOS (Apple Silicon doesn't fully support bfloat16).

🏃‍♂️ Environment (运行环境)

macOS M4 Pro

🌰 Minimal Reproducible Example (最小可复现问题的Demo)

on MacOS, M chip, got error messsage when process "Error Variable dtype not match, Variable [ linear_164.w_0 ] need tensor with dtype paddle.float32 but load tensor with dtype paddle.bfloat16"

hcodestack avatar Oct 17 '25 22:10 hcodestack

Hi, regarding compatibility with Apple Silicon, there are indeed some issues at the moment. We will address this in a future update.

cuicheng01 avatar Oct 18 '25 03:10 cuicheng01

it works but very slow

recognize_png_mac_v1.py

cylcc06 avatar Nov 05 '25 12:11 cylcc06