Iâm surprised you came up with such a workaroundâŚ
It seems that the token area is being modified, and the operation has changed twice today alone. Well, itâs probably best to wait for it to be fixed.
Iâm surprised you came up with such a workaroundâŚ
It seems that the token area is being modified, and the operation has changed twice today alone. Well, itâs probably best to wait for it to be fixed.
i agree john
i thought i was going crazy, but over the last 48 hours or so token procedures appear to change
and yes, putting it into a secret worked for me for some models too, still.
and yes, previously omitting tokens granted access for me as well.
i cant confirm CAPPING tokens, not yet at least
i cant really keep track of what i can and cant confirm or when
likely tomorrow itll change again eh?
i need a nice tall glass of drink
yes this works (but I donât know why the below cannot work for me:
from huggingface_hub import notebook_login
notebook_login()
thank you so much! it works for me
Iâm having a similar issue now and Iâm downloading stabilityai/stable-diffusion-xl-base-1.0 encounter RuntimeError: Data processing error: CAS service error : Reqwest Error: HTTP status client error (401 Unauthorized), domain: https:cas-server.xethub.hf.co/reconstruction/4cb12f8b6ebb11f02b908c4c878871cae90cbe3bad06db19e97336df6b7f3a6e I donât understand why public repositories need authorization as well, and even if I give the correct token, it will still get an error, and I download other public models that donât happen at the same time , I wouldnât go wrong downloading the model on other PCs either
Hmm⌠How about pip install -U huggingface_hub[hf_xet]
?
Iâm getting the same error and I have hf-xet 1.1.5. Iâm behind a firewall but have no problems with requests to other URLs.
Hi @XPW123 thanks for the report - are you behind any firewalls when you make this request? If so, could you make sure you have the following domains allowlisted:
cas-bridge.xethub.hf.co
transfer.xethub.hf.co
cas-server.xethub.hf.co
If not (or if that doesnât help), could you open an issue on the xet-core repository and we can investigate there?
Hi @alfredgabal
Could you provide the full error youâre seeing?
Also, do you have the following URLs allowlisted:
cas-bridge.xethub.hf.co
transfer.xethub.hf.co
cas-server.xethub.hf.co
Hi @jsulz , thanks for the reply. I do get a response when I curl those three URLs. Hereâs the full error message (I replaced some âhttpsâ with âh***sâ because the page doesnât let me post more than two links):
Fetching 83 files: 0%| | 0/83 [00:00<?, ?it/s]{âtimestampâ:â2025-07-01T17:37:59.153575Zâ,âlevelâ:âERRORâ,âfieldsâ:{âmessageâ:âerror downloading range, error: ReqwestMiddlewareError(Middleware(error sending request\n\nCaused by:\n 0: client error (SendRequest)\n 1: connection error\n 2: peer closed connection without sending TLS close_notify: h***s://docs.rs/rustls/latest/rustls/manual/_03_howto/index.html#unexpected-eof))â,âcallerâ:â/home/runner/work/xet-core/xet-core/cas_client/src/download_utils.rs:528â},âfilenameâ:â/home/runner/work/xet-core/xet-core/error_printer/src/lib.rsâ,âline_numberâ:28}
{âtimestampâ:â2025-07-01T18:05:15.966119Zâ,âlevelâ:âWARNâ,âfieldsâ:{âmessageâ:âReqwest(reqwest::Error { kind: Request, source: hyper_util::client::legacy::Error(SendRequest, hyper::Error(Io, Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" })) }). RetryingâŚâ},âfilenameâ:â/home/runner/work/xet-core/xet-core/cas_client/src/http_client.rsâ,âline_numberâ:242}
{âtimestampâ:â2025-07-01T18:05:15.970285Zâ,âlevelâ:âWARNâ,âfieldsâ:{âmessageâ:âRetry attempt #0. Sleeping 2.750031341s before the next attemptâ},âfilenameâ:â/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/reqwest-retry-0.7.0/src/middleware.rsâ,âline_numberâ:171}
Fetching 83 files: 1%| | 1/83 [43:04<58:51:31, 2584.04s/it]
Fetching 83 files: 17%|ââ | 14/83 [43:04<3:32:15, 184.57s/it]
{âtimestampâ:â2025-07-01T18:06:30.649359Zâ,âlevelâ:âERRORâ,âfieldsâ:{âmessageâ:âerror downloading range, error: ReqwestMiddlewareError(Middleware(error sending request\n\nCaused by:\n 0: client error (SendRequest)\n 1: connection error\n 2: peer closed connection without sending TLS close_notify: h***s://docs.rs/rustls/latest/rustls/manual/_03_howto/index.html#unexpected-eof))â,âcallerâ:â/home/runner/work/xet-core/xet-core/cas_client/src/download_utils.rs:528â},âfilenameâ:â/home/runner/work/xet-core/xet-core/error_printer/src/lib.rsâ,âline_numberâ:28}
Traceback (most recent call last):
File â/home/ag/Models/molmo-inference.pyâ, line 15, in
model = AutoModelForCausalLM.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/transformers/models/auto/auto_factory.pyâ, line 593, in from_pretrained
return model_class.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/transformers/modeling_utils.pyâ, line 311, in _wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/transformers/modeling_utils.pyâ, line 4674, in from_pretrained
checkpoint_files, sharded_metadata = _get_resolved_checkpoint_files(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/transformers/modeling_utils.pyâ, line 1295, in _get_resolved_checkpoint_files
checkpoint_files, sharded_metadata = get_checkpoint_shard_files(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/transformers/utils/hub.pyâ, line 1110, in get_checkpoint_shard_files
cached_filenames = cached_files(
^^^^^^^^^^^^^
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/transformers/utils/hub.pyâ, line 557, in cached_files
raise e
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/transformers/utils/hub.pyâ, line 485, in cached_files
snapshot_download(
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/huggingface_hub/utils/_validators.pyâ, line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/huggingface_hub/_snapshot_download.pyâ, line 327, in snapshot_download
thread_map(
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/tqdm/contrib/concurrent.pyâ, line 69, in thread_map
return _executor_map(ThreadPoolExecutor, fn, *iterables, **tqdm_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/tqdm/contrib/concurrent.pyâ, line 51, in _executor_map
return list(tqdm_class(ex.map(fn, *iterables, chunksize=chunksize), **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/tqdm/std.pyâ, line 1181, in iter
for obj in iterable:
^^^^^^^^
File â/home/ag/conda/Molmo/lib/python3.12/concurrent/futures/_base.pyâ, line 619, in result_iterator
yield _result_or_cancel(fs.pop())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File â/home/ag/conda/Molmo/lib/python3.12/concurrent/futures/_base.pyâ, line 317, in _result_or_cancel
return fut.result(timeout)
^^^^^^^^^^^^^^^^^^^
File â/home/ag/conda/Molmo/lib/python3.12/concurrent/futures/_base.pyâ, line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File â/home/ag/conda/Molmo/lib/python3.12/concurrent/futures/_base.pyâ, line 401, in __get_result
raise self._exception
File â/home/ag/conda/Molmo/lib/python3.12/concurrent/futures/thread.pyâ, line 59, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/huggingface_hub/_snapshot_download.pyâ, line 301, in _inner_hf_hub_download
return hf_hub_download(
^^^^^^^^^^^^^^^^
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/huggingface_hub/utils/_validators.pyâ, line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/huggingface_hub/file_download.pyâ, line 1008, in hf_hub_download
return _hf_hub_download_to_cache_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/huggingface_hub/file_download.pyâ, line 1161, in _hf_hub_download_to_cache_dir
_download_to_tmp_and_move(
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/huggingface_hub/file_download.pyâ, line 1710, in _download_to_tmp_and_move
xet_get(
File â/home/ag/conda/Molmo/lib/python3.12/site-packages/huggingface_hub/file_download.pyâ, line 627, in xet_get
download_files(
RuntimeError: Data processing error: CAS service error : Reqwest Error: HTTP status client error (401 Unauthorized), domain: https://cas-server.xethub.hf.co/reconstruction/c4ac4717bebd033e12a7f0036103c7383614198445be5970f0187fa2bfc0d9c3
Thanks for your help!
Thanks for the additional details! There is potentially some work we can do here on our authentication to the storage system backing these files.
I opened up an issue here on the xet-core
repo, since the issue can potentially be addressed there.
Feel free to add any additional context or subscribe to the issue there to get updates (Iâll also post here when we think weâve resolved the issue).
Hey @alfredgabal - just wanted to let you know that we believe the root cause of this issue was not providing enough buffer between a token refresh and when that same token was set to expire. The PR for this is here and will be included in our next release.
Thank you for reporting!