|
| 1 | +# Release Notes - v2.3.0 |
| 2 | + |
| 3 | +> **Release Date:** December 31, 2024 |
| 4 | +
|
| 5 | +## 🎉 Highlights |
| 6 | + |
| 7 | +This is a **major release** introducing a brand new **Web UI**, complete project restructuring, and numerous bug fixes. The project has been reorganized into a clean, modular architecture following Go best practices. |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## ✨ New Features |
| 12 | + |
| 13 | +### 🌐 Web Interface |
| 14 | +- **Beautiful Terminal-Noir themed Web UI** for managing downloads |
| 15 | +- Real-time progress updates via WebSocket |
| 16 | +- Separate pages for downloading **Models** and **Datasets** |
| 17 | +- Per-file progress bars with live status updates |
| 18 | +- Settings management (connections, retries, verification mode) |
| 19 | +- Job deduplication - prevents duplicate downloads of the same repo |
| 20 | + |
| 21 | +### 🚀 One-Liner Web Mode |
| 22 | +Start the web UI instantly with: |
| 23 | +```bash |
| 24 | +bash <(curl -sSL https://g.bodaay.io/hfd) -w |
| 25 | +``` |
| 26 | +Automatically opens your browser to `http://localhost:8080` |
| 27 | + |
| 28 | +### 🔧 New CLI Commands |
| 29 | +- `hfdownloader serve` - Start the web server |
| 30 | +- `hfdownloader version` - Show version information |
| 31 | +- `hfdownloader config` - Manage configuration |
| 32 | + |
| 33 | +### 📦 Reusable Go Package |
| 34 | +The downloader is now available as an importable package: |
| 35 | +```go |
| 36 | +import "github.com/bodaay/HuggingFaceModelDownloader/pkg/hfdownloader" |
| 37 | +``` |
| 38 | + |
| 39 | +--- |
| 40 | + |
| 41 | +## 🐛 Bug Fixes |
| 42 | + |
| 43 | +### Fixed: "error: tree API failed: 400 Bad Request" |
| 44 | +- Repository paths with slashes (e.g., `Qwen/Qwen3-0.6B`) were being incorrectly URL-escaped |
| 45 | +- Now correctly handles repo IDs without double-escaping the slash |
| 46 | + |
| 47 | +### Fixed: TUI Speed/ETA Display Jumping Around |
| 48 | +- Implemented **Exponential Moving Average (EMA)** for smooth speed calculations |
| 49 | +- Added minimum time interval (50ms) before recalculating speed |
| 50 | +- Both per-file and overall speeds are now stable and readable |
| 51 | + |
| 52 | +### Fixed: TUI Total File Size Fluctuating |
| 53 | +- File totals no longer get overwritten with incorrect values during progress updates |
| 54 | +- Now only updates total if a valid value is provided |
| 55 | + |
| 56 | +### Fixed: Downloads Appearing Stuck |
| 57 | +- Removed blocking HEAD requests during repository scanning |
| 58 | +- Large repos (90+ files) now start downloading within seconds instead of minutes |
| 59 | +- Assumed LFS files support range requests (they always do on HuggingFace) |
| 60 | + |
| 61 | +### Fixed: Web UI Progress Not Updating |
| 62 | +- Added `progressReader` wrapper for real-time progress during single-file downloads |
| 63 | +- Progress events now use correct `Downloaded` field (cumulative bytes) |
| 64 | +- UI throttled to 10fps to prevent DOM thrashing |
| 65 | + |
| 66 | +--- |
| 67 | + |
| 68 | +## 🏗️ Architecture Changes |
| 69 | + |
| 70 | +### Project Structure |
| 71 | +The codebase has been completely reorganized: |
| 72 | + |
| 73 | +``` |
| 74 | +├── cmd/hfdownloader/ # CLI entry point |
| 75 | +├── internal/ |
| 76 | +│ ├── cli/ # CLI commands (Cobra) |
| 77 | +│ ├── server/ # Web server & API |
| 78 | +│ ├── tui/ # Terminal UI |
| 79 | +│ └── assets/ # Embedded web assets |
| 80 | +├── pkg/hfdownloader/ # Reusable download library |
| 81 | +└── scripts/ # Installation scripts |
| 82 | +``` |
| 83 | + |
| 84 | +### Security Improvements |
| 85 | +- **Output path is server-controlled** - Cannot be changed via API or Web UI |
| 86 | +- Separate directories for models (`./Models/`) and datasets (`./Datasets/`) |
| 87 | +- Token is never logged or exposed in API responses |
| 88 | + |
| 89 | +### Testing |
| 90 | +- Comprehensive unit tests for `JobManager`, API handlers, and WebSocket |
| 91 | +- Integration tests for end-to-end download flows |
| 92 | +- Test coverage for job deduplication and cancellation |
| 93 | + |
| 94 | +--- |
| 95 | + |
| 96 | +## 📊 Performance Improvements |
| 97 | + |
| 98 | +| Improvement | Before | After | |
| 99 | +|-------------|--------|-------| |
| 100 | +| Large repo scan (90+ files) | 5+ minutes | ~2 seconds | |
| 101 | +| Progress update frequency | 1 second | 200ms | |
| 102 | +| Speed display stability | Jumpy/erratic | Smooth (EMA) | |
| 103 | +| Web UI responsiveness | Laggy | Throttled 10fps | |
| 104 | + |
| 105 | +--- |
| 106 | + |
| 107 | +## 🔄 Breaking Changes |
| 108 | + |
| 109 | +- Main package moved from `hfdownloader/` to `pkg/hfdownloader/` |
| 110 | +- CLI now uses Cobra commands instead of flags-only |
| 111 | +- `main.go` replaced with `cmd/hfdownloader/main.go` |
| 112 | +- Old `makefile` replaced with `build.sh` |
| 113 | + |
| 114 | +--- |
| 115 | + |
| 116 | +## 📥 Installation |
| 117 | + |
| 118 | +### One-Liner (Recommended) |
| 119 | +```bash |
| 120 | +# Install to /usr/local/bin |
| 121 | +bash <(curl -sSL https://g.bodaay.io/hfd) -i |
| 122 | + |
| 123 | +# Start Web UI |
| 124 | +bash <(curl -sSL https://g.bodaay.io/hfd) -w |
| 125 | + |
| 126 | +# Download a model directly |
| 127 | +bash <(curl -sSL https://g.bodaay.io/hfd) download TheBloke/Mistral-7B-GGUF |
| 128 | +``` |
| 129 | + |
| 130 | +### From Source |
| 131 | +```bash |
| 132 | +git clone https://github.com/bodaay/HuggingFaceModelDownloader |
| 133 | +cd HuggingFaceModelDownloader |
| 134 | +go build -o hfdownloader ./cmd/hfdownloader |
| 135 | +``` |
| 136 | + |
| 137 | +--- |
| 138 | + |
| 139 | +## 🙏 Acknowledgments |
| 140 | + |
| 141 | +Thanks to the community for bug reports and PRs that helped identify issues: |
| 142 | +- URL escaping fix (related to #60) |
| 143 | +- TUI speed improvements (related to #59) |
| 144 | +- API 400 fixes (related to #58) |
| 145 | + |
| 146 | +--- |
| 147 | + |
| 148 | +## 📋 Full Changelog |
| 149 | + |
| 150 | +**New Files:** |
| 151 | +- `cmd/hfdownloader/main.go` - New CLI entry point |
| 152 | +- `internal/server/*` - Complete web server implementation |
| 153 | +- `internal/assets/*` - Embedded web UI (HTML/CSS/JS) |
| 154 | +- `pkg/hfdownloader/*` - Modular download library |
| 155 | +- `build.sh` - Cross-platform build script |
| 156 | + |
| 157 | +**Modified:** |
| 158 | +- `scripts/gist_gethfd.sh` - Added `-w` flag for web mode |
| 159 | +- `README.md` - Updated documentation with web UI info |
| 160 | +- `go.mod` - Added new dependencies (Cobra, Gorilla WebSocket) |
| 161 | + |
| 162 | +**Removed:** |
| 163 | +- `hfdownloader/` - Moved to `pkg/hfdownloader/` |
| 164 | +- `main.go` - Replaced by `cmd/hfdownloader/main.go` |
| 165 | +- `makefile` - Replaced by `build.sh` |
| 166 | + |
0 commit comments