Problem
This is about the HTTP transfer path (HF_HUB_DISABLE_XET=1). The xet path has a separate coarse-progress issue already tracked in #4058; I'm deliberately on HTTP because of that.
On HTTP, the progress callback passed via tqdm_class= on hf_hub_download / snapshot_download fires in very coarse intervals. On a ~1.5 MB/s home connection it fires roughly once every 7 seconds. A user watching a progress bar sees long silences between jumps (0 → 12 → 23 → …) and on small files may only see one update at the very end. The download is progressing fine — it just looks stalled. There's no env variable or public hook to change how often the callback fires.
Workaround I'm using
At package import, before any HF call, and with HF_HUB_DISABLE_XET=1:
from huggingface_hub import constants as _hf_constants
_hf_constants.DOWNLOAD_CHUNK_SIZE = 200 * 1024
With this, the callback fires several times per second at typical home-internet rates and progress animates smoothly. Overhead is negligible and it does not produce more network round-trips. I'm poking an internal constant, which isn't ideal, but it's the only lever I could find.
Sharing in case it helps anyone else running into the same thing.
Suggested fix
Expose a way to make progress callbacks fire more frequently — env variable, a progress_interval= / chunk_size= kwarg on the download functions, or simply a more frequent default. Anything that doesn't require downstream code to reach into internals.
Environment
huggingface_hub==1.11.0
- Reproduces in any UI that renders the tqdm callback (Textual TUI, Jupyter, desktop GUIs).
Problem
This is about the HTTP transfer path (
HF_HUB_DISABLE_XET=1). The xet path has a separate coarse-progress issue already tracked in #4058; I'm deliberately on HTTP because of that.On HTTP, the progress callback passed via
tqdm_class=onhf_hub_download/snapshot_downloadfires in very coarse intervals. On a ~1.5 MB/s home connection it fires roughly once every 7 seconds. A user watching a progress bar sees long silences between jumps (0 → 12 → 23 → …) and on small files may only see one update at the very end. The download is progressing fine — it just looks stalled. There's no env variable or public hook to change how often the callback fires.Workaround I'm using
At package import, before any HF call, and with
HF_HUB_DISABLE_XET=1:With this, the callback fires several times per second at typical home-internet rates and progress animates smoothly. Overhead is negligible and it does not produce more network round-trips. I'm poking an internal constant, which isn't ideal, but it's the only lever I could find.
Sharing in case it helps anyone else running into the same thing.
Suggested fix
Expose a way to make progress callbacks fire more frequently — env variable, a
progress_interval=/chunk_size=kwarg on the download functions, or simply a more frequent default. Anything that doesn't require downstream code to reach into internals.Environment
huggingface_hub==1.11.0