NokiMo
Furkan Gözükara
Furkan Gözükara

patreon


Solving Invalid credentials in Authorization header error when downloading models from Hugging Face

Traceback (most recent call last):

File "C:\Python310\lib\site-packages\huggingface_hub\utilshttp.py", line 409, in hfraise_for_status

response.raise_for_status()

File "C:\Python310\lib\site-packages\requests\models.py", line 1024, in raise_for_status

raise HTTPError(http_error_msg, response=self)

requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/api/models/tencent/InstantCharacter/revision/main

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "C:\Python310\lib\site-packages\huggingface_hubsnapshotdownload.py", line 155, in snapshot_download

repo_info = api.repo_info(repo_id=repo_id, repo_type=repo_type, revision=revision, token=token)

File "C:\Python310\lib\site-packages\huggingface_hub\utilsvalidators.py", line 114, in inner_fn

return fn(args, *kwargs)

File "C:\Python310\lib\site-packages\huggingface_hub\hf_api.py", line 2807, in repo_info

return method(

File "C:\Python310\lib\site-packages\huggingface_hub\utilsvalidators.py", line 114, in inner_fn

return fn(args, *kwargs)

File "C:\Python310\lib\site-packages\huggingface_hub\hf_api.py", line 2592, in model_info

hf_raise_for_status(r)

File "C:\Python310\lib\site-packages\huggingface_hub\utilshttp.py", line 482, in hfraise_for_status

raise _format(HfHubHTTPError, str(e), response) from e

huggingface_hub.errors.HfHubHTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/api/models/tencent/InstantCharacter/revision/main (Request ID: Root=1-6802ce62-2d60681557171e1c7ea32abb;9d733308-80ca-4d33-8ee4-f7fd586b6f55)

Invalid credentials in Authorization header

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "E:\InstantCharacter_v1\Download_Models.py", line 2, in <module>

snapshot_download(repo_id="tencent/InstantCharacter",local_dir="InstantCharacter/checkpoints")

File "C:\Python310\lib\site-packages\huggingface_hub\utilsvalidators.py", line 114, in inner_fn

return fn(args, *kwargs)

File "C:\Python310\lib\site-packages\huggingface_hubsnapshotdownload.py", line 235, in snapshot_download

raise LocalEntryNotFoundError(

huggingface_hub.errors.LocalEntryNotFoundError: An error happened while trying to locate the files on the Hub and we cannot find the appropriate snapshot folder for the specified revision on the local disk. Please check your internet connection and try again.

Solving Invalid credentials in Authorization header error when downloading models from Hugging Face Solving Invalid credentials in Authorization header error when downloading models from Hugging Face

Related Creators