Repository navigation
A fix for the first-run model download, which could sit at 0% for a long time when huggingface.co was slow.
Fixed
- Slow downloads move to the other host. With the download source on Auto, RepoFind now tries huggingface.co and hf-mirror.com side by side and starts with whichever answers faster. If the speed then stays under 200 KB/s for 8 seconds, or the connection drops, it moves to the other host and continues from where it stopped instead of starting over. If both are slow, it stays on the faster one rather than switching back and forth.
- Downloaded models are checked.
model.onnxmust match its published SHA-256 andtokenizer.jsonmust be valid JSON before a model is used. A damaged file is deleted and the app asks you to download again. - The progress line says more. It shows the download speed, notes when it switched host ("switched to hf-mirror.com"), and shows a short "Checking…" step at the end.
Nothing else changed since v0.2.0. Indexes and downloaded models from v0.2.0 keep working; no rebuild is needed.
Downloads
| Platform | File | Needs | Tested |
|---|---|---|---|
| macOS, Apple silicon | RepoFind-0.2.1-macos-arm64.zip |
macOS 14+ | CI, plus a local build of the same code |
| macOS, Intel | RepoFind-0.2.1-macos-x86_64.zip |
macOS 14+ | CI only |
| Linux x86_64 | RepoFind-0.2.1-linux-x86_64.tar.gz |
glibc 2.39+, GTK 4.14+, WebKitGTK 6.0 (Ubuntu 24.04 or later) | CI only |
| Linux arm64 | RepoFind-0.2.1-linux-arm64.tar.gz |
same as above | CI only |
| Windows x86_64 | RepoFind-0.2.1-windows-x86_64.zip |
Windows 10 1809+ | CI only |
How the switching was tested: against two local stand-in hosts, one of which slows to 20 KB/s after the first megabyte. The download moved to the other host mid-file and the joined file passed the SHA-256 check. A real download from huggingface.co with resume also passed. The Intel Mac build still has no local models.
Each file has a .sha256 next to it. Install as for v0.2.0: on macOS, clear the quarantine flag once with xattr -dr com.apple.quarantine /Applications/RepoFind.app.
修复第一次下载模型的问题:huggingface.co 很慢时,下载可能长时间卡在 0%。
修复
- 下载慢了会换源:下载源选「自动」时,会同时试 huggingface.co 和 hf-mirror.com,哪个响应快先用哪个。下载途中如果连续 8 秒低于 200 KB/s,或者断线,会换到另一个源,从已下好的部分接着下,不用从头再来。两个源都慢时,留在快一点的那个上,不来回切换。
- 下完会校验:
model.onnx要和官方公布的 SHA-256 一致,tokenizer.json必须是合法的 JSON,通过后才会使用。文件损坏会被删掉,并提示重新下载。 - 进度信息更详细:显示下载速度;换了源会注明「已切换到 hf-mirror.com」;最后有一步「正在校验」。
除此之外和 v0.2.0 相同。v0.2.0 的索引和已下载的模型都能继续用,不需要重建索引。
换源的测试方式:在本机起两个替身下载源,其中一个下到 1 MB 后限速到 20 KB/s。下载中途切到了另一个源,前后两段拼起来的文件通过了 SHA-256 校验。从 huggingface.co 真实下载和续传也测过。Intel Mac 版仍然没有本地模型。
安装方式和 v0.2.0 相同;macOS 上需要执行一次 xattr -dr com.apple.quarantine /Applications/RepoFind.app。