# 1GB storage limit in spaces?

**URL:** <https://discuss.huggingface.co/t/1gb-storage-limit-in-spaces/170196>\
**Category:** Spaces\
**Created:** [November 10, 2025, 10:14pm UTC](https://discuss.huggingface.co/t/1gb-storage-limit-in-spaces/170196 "2025-11-10T22:14:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![morenolq](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/morenolq/32/55542_2.png) [@morenolq](https://discuss.huggingface.co/u/morenolq)\
**Post date:** [November 10, 2025, 10:14pm UTC](https://discuss.huggingface.co/t/1gb-storage-limit-in-spaces/170196/1 "2025-11-10T22:14:35Z")

</div>

As for the question, is there any “new” storage limit for spaces? I had the feeling that this was set to 50GB, but today I got

```sh
batch response: Repository storage limit reached (Max: 1 GB)
error: failed to push some refs to …

```

Is there any limit to 1GB now?

---

<div class="post-metadata">

**Author:** ![HanzhouLiu](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/hanzhouliu/32/55602_2.png) [@HanzhouLiu](https://discuss.huggingface.co/u/HanzhouLiu)\
**Post date:** [November 10, 2025, 10:41pm UTC](https://discuss.huggingface.co/t/1gb-storage-limit-in-spaces/170196/2 "2025-11-10T22:41:11Z")

</div>

The large model weights should be put into a new hf dataset.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [November 11, 2025, 12:08am UTC](https://discuss.huggingface.co/t/1gb-storage-limit-in-spaces/170196/3 "2025-11-11T00:08:10Z")

</div>

Yeah. True. I think it was probably last year when that restriction was introduced. Placing large files in model repositories or dataset repositories and downloading them during execution is fine. Downloading from HF repositories to HF runtime completes almost instantly. Writing the code is a bit of a hassle, but that’s all.

* * *

Space repositories are capped at ~1 GB of Git/LFS storage. The “50 GB” you remember is the default runtime disk for a free CPU Space. Store large weights and datasets in **model** or **dataset** repos and pull them at runtime, not in the Space repo. ([Hugging Face Forums](https://discuss.huggingface.co/t/error-repository-storage-limit-reached-max-1-gb/128910?page=2 "Error: Repository storage limit reached (Max: 1 GB) - Page 2"))

# What you hit

- The error `batch response: Repository storage limit reached (Max: 1 GB)` indicates you exceeded the **Space repo** cap, not the runtime disk. This cap currently applies to Free and Pro accounts and isn’t user-upgradeable. ([Hugging Face Forums](https://discuss.huggingface.co/t/error-repository-storage-limit-reached-max-1-gb/128910?page=2 "Error: Repository storage limit reached (Max: 1 GB) - Page 2"))

# Two different “storages” to keep straight

- **Repo storage (Git/LFS)**: ~ **1 GB** limit for the **Space repository**. Designed for app code, small assets, and config only. Not for large weights. ([Hugging Face Forums](https://discuss.huggingface.co/t/error-repository-storage-limit-reached-max-1-gb/128910?page=2 "Error: Repository storage limit reached (Max: 1 GB) - Page 2"))
- **Runtime disk** : the VM filesystem your Space runs on. Default **50 GB ephemeral** on free CPU hardware. You can add **persistent storage** mounted at `/data` on paid tiers. These are separate from the Git/LFS cap. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-overview "Spaces Overview"))

# Where to put big files

- Put model shards and datasets in **model** / **dataset** repos. Per-file limit **50 GB** ; account-level quotas are much higher and upgradeable. Your Space then downloads or streams them at startup or on first use. ([Hugging Face](https://huggingface.co/docs/hub/en/storage-limits "Storage limits"))

# Recommended pattern

Keep the Space repo tiny. Fetch artifacts at runtime and cache them to persistent storage if you enabled it.

```python
# app.py
# References:
# - Spaces overview (50 GB runtime disk): https://huggingface.co/docs/hub/en/spaces-overview
# - Spaces persistent storage (/data): https://huggingface.co/docs/hub/en/spaces-storage
# - Hub storage limits (50 GB per-file, super-squash): https://huggingface.co/docs/hub/en/storage-limits

import os
from huggingface_hub import snapshot_download, hf_hub_download

# If you added persistent storage, keep caches under /data to survive restarts.
os.environ.setdefault("HF_HOME", "/data/.huggingface")

# Pull full model repo (weights/config) to local cache or working dir.
_ = snapshot_download(repo_id="org/large-model", revision="main")

# Or pull a single file from a model repo.
cfg = hf_hub_download(repo_id="org/large-model", filename="config.json")

```

# If you already hit the 1 GB Space-repo limit

1. **Delete large LFS files** in the Space: Repo → Settings → Storage → “List LFS files,” then remove unneeded items. Deleting pointers alone doesn’t free space. ([Hugging Face](https://huggingface.co/docs/hub/en/storage-limits "Storage limits"))
2. **Reduce history bloat** : use the Hub’s **super\_squash\_history** to rewrite history and reclaim quota. This is destructive by design. ([Hugging Face](https://huggingface.co/docs/hub/en/storage-limits "Storage limits"))
3. **Move big assets out** : push them to a model/dataset repo and fetch at runtime as shown above. Per-file limit is 50 GB. ([Hugging Face](https://huggingface.co/docs/hub/en/storage-limits "Storage limits"))

# Common failure modes to avoid

- **Confusing repo cap with runtime disk** : Hitting 1 GB on the repo blocks `git push`. Hitting 50 GB on the VM causes eviction messages like “Workload evicted, storage limit exceeded (50G).” Different fixes. ([Hugging Face Forums](https://discuss.huggingface.co/t/workload-evicted-storage-limit-exceeded-50g-when-swap-is-merely-at-16g/169386 "”Workload Evicted, Storage Limit Exceeded (50G)” when ..."))
- **LFS pointer deletions** : Removing only LFS pointers does not reclaim storage. Use the Storage page or API to delete actual LFS objects, or super-squash. ([Hugging Face](https://huggingface.co/docs/hub/en/storage-limits "Storage limits"))

# Quick answers to your questions

- **“Is there any limit to 1 GB now?”** Yes, for Space repos. Not upgradeable by plan today. ([Hugging Face Forums](https://discuss.huggingface.co/t/error-repository-storage-limit-reached-max-1-gb/128910?page=2 "Error: Repository storage limit reached (Max: 1 GB) - Page 2"))
- **“50 GB”** refers to the default ephemeral runtime disk of a Space VM, not the repo. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-overview "Spaces Overview"))
- **“Should large model weights go in a dataset/model repo, not the space repo?”** Correct. Use model/dataset repos and download at runtime. ([Hugging Face](https://huggingface.co/docs/hub/en/storage-limits "Storage limits"))

# Short, curated references

- **Docs**  
• Spaces overview and default hardware (50 GB disk). ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-overview "Spaces Overview"))  
• Spaces persistent storage and `/data` usage. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-storage "Disk usage on Spaces"))  
• Hub storage limits, 50 GB per-file, LFS cleanup, super-squash. ([Hugging Face](https://huggingface.co/docs/hub/en/storage-limits "Storage limits"))
- **Forum confirmations**  
• “There isn’t a way to increase the 1 GB storage limit for a Space repo.” ([Hugging Face Forums](https://discuss.huggingface.co/t/error-repository-storage-limit-reached-max-1-gb/128910?page=2 "Error: Repository storage limit reached (Max: 1 GB) - Page 2"))  
• Multiple reports of `Repository storage limit reached (Max: 1 GB)` on Spaces. ([Hugging Face Forums](https://discuss.huggingface.co/t/error-repository-storage-limit-reached-max-1-gb/128910 "Error: Repository storage limit reached (Max: 1 GB)"))
- **Related**  
• Eviction when VM disk crosses 50 GB. ([Hugging Face Forums](https://discuss.huggingface.co/t/workload-evicted-storage-limit-exceeded-50g-when-swap-is-merely-at-16g/169386 "”Workload Evicted, Storage Limit Exceeded (50G)” when ..."))  
• GitHub issue confirming 50 GB per-file behavior. ([GitHub](https://github.com/huggingface/huggingface_hub/issues/1933 "Maximum individual file size is 50.0GB error when my file is ..."))

Bottom line: keep the Space repo lean. Put big files in model/dataset repos. Cache to `/data` if you enable persistent storage. This separates deployability (git) from capacity (VM disk and Hub storage). ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-storage "Disk usage on Spaces"))

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](https://discuss.huggingface.co/u/system)\
**Post date:** [November 25, 2025, 2:58pm UTC](https://discuss.huggingface.co/t/1gb-storage-limit-in-spaces/170196/4 "2025-11-25T14:58:35Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
