Download speed way too slow Hugging Face's `huggingface_hub` v1.1.x CLI can be tuned for faster large-file downloads by setting environment variables that raise Xet chunk concurrency and move the cache to an SSD, according to a step-by-step playbook citing Hugging Face's official environment-variable documentation. The guide recommends `HF_XET_HIGH_PERFORMANCE=1` and `HF_XET_NUM_CONCURRENT_RANGE_GETS=24` (up from the default 16, with 24–32 suggested on fast SSD/CPU machines and 8–16 on weaker hardware), plus `HF_HUB_DOWNLOAD_TIMEOUT=60` to replace the 10-second default. For spinning disks it advises `HF_XET_RECONSTRUCT_WRITE_SEQUENTIALLY=1` to avoid thrashing from parallel random writes, and it notes that `hf download --include` with `--local-dir` avoids pulling entire repositories. Well, for now, the method to set the HF CLI to the absolute fastest mode is currently as follows. Since the method for setting environment variables varies by OS, replace the export part according to your environment. Below is a focused, step-by-step playbook that actually increases Hugging Face HF CLI download speed, with background for each step and concrete commands. The knobs and commands are current as of v1.1.x of huggingface hub . Large files on the Hub are served via a CDN and, by default, downloaded through the HF CLI using the Rust-based hf-xet path. Xet reconstructs files from chunks; this favors SSD/NVMe and high concurrency, and it exposes environment variables you can tune. Route/POP region variability also matters, so the same 500 Mb/s line can feel “very fast” or “very slow” depending on path and local I/O. Hugging Face https://huggingface.co/docs/huggingface hub/main/en/package reference/environment variables Why: Eliminates a common disk bottleneck and ensures you have recent CLI/Xet behavior. HF HOME controls where the Hub cache lives. Hugging Face https://huggingface.co/docs/huggingface hub/main/en/package reference/environment variables References: - HF env vars HF HOME, HF HUB CACHE, timeouts, Xet knobs : https://huggingface.co/docs/huggingface hub/en/package reference/environment variables - CLI install/usage: https://huggingface.co/docs/huggingface hub/en/guides/cli python -m pip install -U "huggingface hub" hf xet export HF HOME="/fast-ssd/.cache/huggingface" move cache to SSD/NVMe export HF HUB DOWNLOAD TIMEOUT=60 reduce spurious timeouts on slow routes HF HOME sets the base cache dir; HF HUB DOWNLOAD TIMEOUT raises the per-request timeout from the 10 s default to something more forgiving. Hugging Face https://huggingface.co/docs/huggingface hub/main/en/package reference/environment variables Why: The Xet backend exposes controls that directly impact throughput. High-perf mode tries to saturate network/CPU; the per-file concurrency HF XET NUM CONCURRENT RANGE GETS increases parallel chunk reads. Defaults are conservative 16 . Hugging Face https://huggingface.co/docs/huggingface hub/main/en/package reference/environment variables References HF XET HIGH PERFORMANCE, HF XET NUM CONCURRENT RANGE GETS : https://huggingface.co/docs/huggingface hub/en/package reference/environment variables export HF XET HIGH PERFORMANCE=1 export HF XET NUM CONCURRENT RANGE GETS=24 try 24–32 on fast SSD/CPU; 8–16 on weaker machines These variables are officially documented; raising concurrency helps if you have headroom. Hugging Face https://huggingface.co/docs/huggingface hub/main/en/package reference/environment variables Why: Parallel random writes that help SSDs can thrash spinning disks. The Xet toggle below switches to sequential writes and is specifically recommended for HDDs. Hugging Face https://huggingface.co/docs/huggingface hub/main/en/package reference/environment variables Reference: HF XET RECONSTRUCT WRITE SEQUENTIALLY HDD-only https://huggingface.co/docs/huggingface hub/en/package reference/environment variables export HF XET RECONSTRUCT WRITE SEQUENTIALLY=1 --include and --local-dir Why: Avoids pulling entire repos and keeps writes local to your target folder. The CLI implements patterns and a direct “download-to-folder” mode. Hugging Face https://huggingface.co/docs/huggingface hub/en/guides/cli References: - CLI download patterns & --local-dir: https://huggingface.co/docs/huggingface hub/en/guides/cli - Download guide hf hub download/snapshot download : https://huggingface.co/docs/huggingface hub/en/guides/download hf download Comfy-Org/Qwen-Image-Edit ComfyUI \ --include "split files/diffusion models/qwen image edit fp8 e4m3fn.safetensors" \ --local-dir "/path/to/ComfyUI/models/diffusion models" Why: Isolate whether Xet routing/behavior is the issue on your machine/route. You can explicitly disable Xet; set this before importing or invoking HF code so it’s honored. Hugging Face https://huggingface.co/docs/huggingface hub/main/en/package reference/environment variables References: - HF HUB DISABLE XET must be set prior to import/CLI : https://huggingface.co/docs/huggingface hub/en/package reference/environment variables - Note about setting it before use: https://github.com/huggingface/huggingface hub/issues/3266 export HF HUB DISABLE XET=1 hf download