v1.18.0
Breaking Changes📦 huggingface-hubView on GitHub →
⚠ 1 breaking✨ 5 features🐛 3 fixes🔧 6 symbols
Summary
This release introduces a unified `hf cp` command for all file operations and enhances URI parsing to accept web URLs. A critical fix was implemented to ensure concurrent download safety, which removes support for resuming partial downloads in specific file system scenarios.
⚠️ Breaking Changes
- Resuming a previously failed partial download is no longer possible due to a change ensuring concurrent download safety across various file systems (Lustre, GPFS, NFS) where file locking might fail silently. This change forces downloads to a fresh temporary file instead of resuming incomplete ones. This is only relevant if `hf_xet` was disabled.
Migration Steps
- If you relied on resuming partial downloads for files when `hf_xet` was disabled, be aware that this functionality is removed. Downloads will restart from scratch if interrupted.
✨ New Features
- Introduced a unified `hf cp` command to handle all file-copy workflows (local upload, Hub download, remote-to-remote copy) using consistent `hf://` URI syntax.
- The `hf cp` command supports streaming from stdin (`-`) or to stdout (`-`).
- A trailing `/` on the source path in `hf cp` now enables rsync-style semantics (copying folder contents instead of the folder itself).
- The `parse_hf_uri` function now accepts Hugging Face web URLs directly.
- Added an Easter egg: a city skyline visualization in `hf repos ls` output.
🐛 Bug Fixes
- Fixed an issue where user home directory (`~`) was not expanded correctly in `local_dir` and `cache_dir` during file downloads.
- Fixed repository/bucket creation not failing when receiving an HTTP 401 status code if the resource already exists.
- Fixed an issue where the umask probe could write a temporary file outside the intended download directory.