facebookresearch / nougat

Implementation of Nougat Neural Optical Understanding for Academic Documents
https://facebookresearch.github.io/nougat/
MIT License
8.98k stars 567 forks source link

It doesn't seem to run on macOS? #6

Closed zer0yu closed 1 year ago

zer0yu commented 1 year ago

Env:

OS: macOS 13.4 22F66 x86_64
Host: MacBookPro16,1
Kernel: 22.5.0
CPU: Intel i9-9880H (16) @ 2.30GHz
GPU: Intel UHD Graphics 630, AMD Radeon Pro 55
Memory: 35222MiB / 65536MiB

Error

WARNING:root:No GPU found. Conversion on CPU is very slow.
/Users/zero/anaconda3/lib/python3.10/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /Users/runner/work/_temp/anaconda/conda-bld/pytorch_1678402629672/work/aten/src/ATen/native/TensorShape.cpp:3484.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
  0%|                                                     | 0/3 [00:00<?, ?it/s]

I'm having some difficulty running nougat on macOS:

  1. I found no way to use the GPU AMD Radeon Pro 55 with this program.
  2. Even after 10 minutes, there's still no progress bar to display.
mingforpc commented 1 year ago

I have same problem too...

zer0yu commented 1 year ago

I've figured out the problem, using the CPU for calculations is really slow! 3 hours or so to ocr on an 18 page paper!

0x0-bwu commented 1 year ago

I've figured out the problem, using the CPU for calculations is really slow! 3 hours or so to ocr on an 18 page paper!

Hi, is there any solution for the 'No GPU found' on macOS? I met the same problem. Thanks a lot~

zer0yu commented 1 year ago

There's no way to fix this, transformer isn't supported for AMD's GPU.

lukas-blecher commented 1 year ago

I've figured out the problem, using the CPU for calculations is really slow! 3 hours or so to ocr on an 18 page paper!

That seems very slow, even for CPU computation. On my laptop I'm getting about 1 page in 40s

wind22 commented 11 months ago

me too

hadim commented 10 months ago

Same problem on an M3 machine. Did someone found a workaround?

ChloeZhou1997 commented 4 months ago

I've figured out the problem, using the CPU for calculations is really slow! 3 hours or so to ocr on an 18 page paper!

That seems very slow, even for CPU computation. On my laptop I'm getting about 1 page in 40s

I set the environment to use CPU and my macbook is M1 MAX, I have been waiting for 10mins for one page and it seems stuck at return torch.var(self.values, 1) / self.values.shape[1]