This happens when your Hugging Face token is not anymore authorized for any reason
In this case run below command and delete your system registered token
Open a CMD and type below and hit enter
huggingface-cli logout
This will fix the below error
You may also get error when trying to download gated models, that time you have to enter your access token to your system and approve that model
But I don't put any Gated models into any of my installer so that is not an issue with my installers (i put them into public repos)
Or I provide a valid token with the installer itself so you don't have to do anything
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.