facebookresearch / nougat

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

How to delete downloaded model? #167

Closed Unturned3 closed 10 months ago

Unturned3 commented 11 months ago

It seems like the nougat command downloads a ~900M pretrained model when it is run for the first time.

Where is this model stored? I'd like to remove it to save disk space as I'm no longer using the nougat tool.

Thanks.

wodin commented 11 months ago

Not sure about that, but I created a virtualenv for nougat and for me it contains this:

    3.9 GiB [######### ] /lib                                                   

That contains python3.10 which contains site-packages and the top of the list of contents there is the following:

    2.4 GiB [##########] /nvidia
  949.2 MiB [###       ] /torch
  133.8 MiB [          ] /triton
   63.2 MiB [          ] /pyarrow
   51.8 MiB [          ] /scipy
lukasherz commented 10 months ago

At least on MacOS, it's stored at: /Users/<user>/.cache/torch/nougat-0.1.0-<model>

wodin commented 10 months ago

It's similar on Linux: ~/.cache/torch/hub/nougat-0.1.0-*

So it might be adhering to the XDG Base Directory Specification

See also: https://wiki.archlinux.org/title/XDG_Base_Directory

I haven't checked if the $XDG_CACHE_HOME environment variable affects the location, though.

Unturned3 commented 10 months ago

At least on MacOS, it's stored at: /Users/<user>/.cache/torch/nougat-0.1.0-<model>

Yup, thanks!

The devs probably should include this somewhere in the docs, in case people want to free up disk space.