Hugging Face "RevisionNotFoundError: Revision Not Found" in CI
You pinned a revision (branch, tag, or commit) that the repo does not have, so the Hub returns 404 for that ref. Pinning is good practice, but the ref must actually exist on the repo.
What this error means
A load fails with "RevisionNotFoundError: 404 Client Error. Revision Not Found for url: https://huggingface.co/<repo>/resolve/<revision>/config.json".
huggingface_hub
huggingface_hub.utils._errors.RevisionNotFoundError: 404 Client Error.
Revision Not Found for url: https://huggingface.co/org/model/resolve/v9.9/config.json.
Available revisions: ['main', 'v1.0'].Common causes
The pinned ref does not exist
A typo in a tag, a branch that was renamed, or a commit not on this repo yields a 404 for that revision.
The ref was removed or the repo history changed
A tag deleted or a branch force-updated can invalidate a previously working pin.
How to fix it
Pin to a ref that exists
- List the repo refs from the model page or the error message.
- Update
revisionto a valid branch, tag, or commit SHA. - Prefer a commit SHA for immutable, reproducible pins.
python
from transformers import AutoModel
AutoModel.from_pretrained("org/model", revision="a1b2c3d4") # a real commit SHAFall back to main if the tag is gone
When a tag was removed, pin to a current commit on the default branch instead.
How to prevent it
- Pin to immutable commit SHAs rather than moving tags.
- Verify the ref exists on the repo before pinning.
- Watch for upstream tag deletions that break pins.
Related guides
Hugging Face "RepositoryNotFoundError" (wrong repo_type) in CIFix huggingface_hub "RepositoryNotFoundError" in CI - the repo id, repo_type (model vs dataset vs space), or…
Hugging Face "does not appear to have a file named config.json" in CIFix transformers "OSError: <repo> does not appear to have a file named config.json" in CI - the repo, revisio…
Hugging Face "401 Client Error: Repository Not Found" in CIFix huggingface_hub "401 Client Error ... Repository Not Found for url" in CI - the Hub rejected an unauthent…