hf_transfer
hf_transfer copied to clipboard
hf_transfer not working from python library for upload
System Info
When using HF_HUB_ENABLE_HF_TRANSFER, I still see my python huggingface_hub uploading as LFS file
Reproduction
import os
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1" from huggingface_hub import HfApi, logging
api.upload_file(/information here/)
In the logs I see: Uploading 1 LFS file to the Hub
which from looking at the code indicates that it's not using hf_transfer
Expected behavior
Uploading 1 LFS files to the Hub using hf_transfer
.
https://github.com/huggingface/huggingface_hub/blob/dfd73c05c7777804b14e9e3cec17e38b23c52ebe/src/huggingface_hub/_commit_api.py#L436C24-L436C100