Release 0.14.1: use Xet for files over 50 GB
Release / release (push) Successful in 3m27s

huggingface_hub 2.1.1 refuses files over MAX_HTTP_DOWNLOAD_SIZE (50 GB)
without Xet; Kaname disables Xet by default for steady progress, so such
downloads failed. A download that includes a file over the limit now
runs hf with Xet enabled and says so in the job log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pascal LinxweilerandClaude Opus 5.5 committed 2026-10-22 09:39:41 +02:00
1 parent 6b67c653b5
commit 22a54f731d
7 files changed
+56 -6

No files matched your search

+9 -2
View File
@@ -25,6 +25,7 @@ import {
modelDir,
removeLocalFile,
removeStaleIncomplete,
xetFor,
} from "./hf-layout";
import { JobLog } from "./job-log";
import { log } from "./log";
@@ -248,6 +249,12 @@ export class DownloadRunner implements Runner {
expected: ExpectedFile[],
): Promise<{ code: number | null; signal: NodeJS.Signals | null; error?: string }> {
const env = coreEnv();
const xet = xetFor(expected, env.HF_HUB_DISABLE_XET);
if (xet.forcedBy.length) {
this.jobLog.system(
`Using Xet for this download: ${xet.forcedBy.slice(0, 3).join(", ")}${xet.forcedBy.length > 3 ? ", …" : ""} is over 50 GB, which hf only downloads with Xet (progress grows in bursts).`,
);
}
const args = [
"download",
this.model.repoId,
@@ -264,7 +271,7 @@ export class DownloadRunner implements Runner {
if (v !== undefined) childEnv[k] = v;
}
Object.assign(childEnv, {
HF_HUB_DISABLE_XET: env.HF_HUB_DISABLE_XET ? "1" : "0",
HF_HUB_DISABLE_XET: xet.useXet ? "0" : "1",
HF_HUB_DISABLE_PROGRESS_BARS: "1",
HF_HUB_DISABLE_TELEMETRY: "1",
NO_COLOR: "1",
@@ -275,7 +282,7 @@ export class DownloadRunner implements Runner {
this.jobLog.system(
`$ hf download ${this.model.repoId} --revision ${this.job.targetSha} --local-dir ${dir} ` +
`(${expected.length} --include pattern(s); xet ${env.HF_HUB_DISABLE_XET ? "off" : "on"}; token ${env.HF_TOKEN ? "set" : "not set"})`,
`(${expected.length} --include pattern(s); xet ${xet.useXet ? "on" : "off"}; token ${env.HF_TOKEN ? "set" : "not set"})`,
);
return new Promise((resolve) => {