facebookresearch / nougat

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

Why? Cannot close object, library is destroyed. This may cause a memory leak! #239

Open Zhuyunfe opened 1 month ago

Zhuyunfe commented 1 month ago

F:\myself\office\nougat-main>nougat 1.pdf -o f:\myself\office E:\Python39\lib\site-packages\torch\functional.py:513: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\TensorShape.cpp:3610.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] 0%| | 0/3 [00:00<?, ?it/s]E:\Python39\lib\site-packages\nougat\model.py:437: UserWarning: var(): degrees of freedom is <= 0. Correction should be strictly less than the reduction factor (input numel divided by output numel). (Triggered internally at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\ReduceOps.cpp:1808.) return torch.var(self.values, 1) / self.values.shape[1] WARNING:root:Found repetitions in sample 1 INFO:root:Processing file 1.pdf with 5 pages 33%|████████████████████████████ | 1/3 [00:09<00:18, 9.17s/it]WARNING:root:Found repetitions in sample 0 WARNING:root:Found repetitions in sample 1 67%|████████████████████████████████████████████████████████ | 2/3 [00:12<00:05, 5.54s/it]WARNING:root:Found repetitions in sample 0 100%|████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:13<00:00, 4.47s/it] -> Cannot close object, library is destroyed. This may cause a memory leak!

Zhuyunfe commented 1 month ago

why ? I have installed transformers==4.38.2

williamparson commented 4 weeks ago

Try pip install transformers==4.25.1

Zhuyunfe commented 4 weeks ago

pip install transformers==4.25.1

I've tried it but it still doesn't work