New Tool Radar

Local AI

How to Check Free Disk Space Before Downloading a Model

Check free disk space before downloading a model file, so the download never fills the drive.

Schematic with three steps: Check free disk space; Compare with the model size; Download only if it fits, or free.

A model file is several gigabytes, and a download that fills the drive fails partway and leaves a broken file. Check the free disk first and compare it with the size of the model you plan to download.

What you need

  • A computer you plan to download a model on
  • The model size from the library or the app listing
  • The disk space checker for your OS

Step 1: Check free disk space

Open the disk space checker for your OS and note the free space on the drive where models are stored. On a terminal, df -h shows free space per drive.

Step 2: Compare with the model size

Compare the free space with the model size: Jan recommends 5 GB or more of free storage per model, and a single large model can be 20 GB or more. The free space must exceed the model size with room left over.

Step 3: Download only if it fits, or free space first

Download the model only if it fits. If it does not fit, delete models you no longer use, or move the models folder to a bigger drive, before starting the download.

Worked example: synthetic disk check

The table below is a synthetic example. It shows the expected result of checking disk space; no disk was checked.

Model size Free disk Verdict
About 2 GB 50 GB free Fits
About 5 GB 10 GB free Fits
About 20 GB 10 GB free Does not fit
About 43 GB 50 GB free Fits, just

Expected result (UNTESTED). the 2 GB and 5 GB models fit, the 20 GB model does not fit in 10 GB free, and the 43 GB model only just fits in 50 GB free. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • The model size is the file size; the download can need extra temporary space, so keep a margin.
  • Model folders grow as you collect models, so check the folder size too, not just one model.
  • A model on an external drive is only usable while the drive is attached.

Sources

See all