EasyOCR icon indicating copy to clipboard operation
EasyOCR copied to clipboard

UserWarning: 'pin_memory' argument is set as true but no accelerator is found, then device pinned memory won't be used.

Open tsukishima1321 opened this issue 6 months ago • 2 comments

I set gpu=False when initing the Reader but get the warning \site-packages\torch\utils\data\dataloader.py:665:UserWarning: 'pin_memory' argument is set as true but no accelerator is found, then device pinned memory won't be used.

tsukishima1321 avatar Jun 19 '25 12:06 tsukishima1321

Cause is memory pinning is being done based on the detected accelerators and doesnt obey the gpu flag.

I have the apparent fix in my fork: https://github.com/brownsloth/EasyOCR . But I still have no clue over if thise fix can impact other code or environments, so if someone can guide me how to run all the tests I can check and then raise a PR.

brownsloth avatar Jun 21 '25 15:06 brownsloth

I hit this today. I processed 65 files can't suppress the warning without doing weird things 😅

micseydel avatar Oct 03 '25 22:10 micseydel