-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Directly using your main_defend.py i.e.
python main_defend.py --image_dir=srcImg --output_dir="facelock_adv_srcImg" --defend_method=facelock --attack_budget=0.03 --step_size=0.01 --num_iters=100, have the following error
Traceback (most recent call last):
File "/Users/keepnoob/miniforge3/envs/facelock/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 409, in hf_raise_for_status
response.raise_for_status()
File "/Users/keepnoob/miniforge3/envs/facelock/lib/python3.10/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/minchul/cvlface_adaface_vit_base_kprpe_webface4m/resolve/main/files.txt
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/keepnoob/Coding/FaceLock/main_defend.py", line 235, in <module>
main(args)
File "/Users/keepnoob/Coding/FaceLock/main_defend.py", line 135, in main
fr_model = load_model_by_repo_id(
File "/Users/keepnoob/Coding/FaceLock/utils.py", line 43, in load_model_by_repo_id
download(repo_id, save_path, HF_TOKEN)
File "/Users/keepnoob/Coding/FaceLock/utils.py", line 18, in download
hf_hub_download(repo_id, 'files.txt', token=HF_TOKEN, local_dir=path, local_dir_use_symlinks=False)
File "/Users/keepnoob/miniforge3/envs/facelock/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/Users/keepnoob/miniforge3/envs/facelock/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 842, in hf_hub_download
return _hf_hub_download_to_local_dir(
File "/Users/keepnoob/miniforge3/envs/facelock/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1091, in _hf_hub_download_to_local_dir
_raise_on_head_call_error(head_call_error, force_download, local_files_only)
File "/Users/keepnoob/miniforge3/envs/facelock/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1486, in _raise_on_head_call_error
raise head_call_error
File "/Users/keepnoob/miniforge3/envs/facelock/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1376, in _get_metadata_or_catch_error
metadata = get_hf_file_metadata(
File "/Users/keepnoob/miniforge3/envs/facelock/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/Users/keepnoob/miniforge3/envs/facelock/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1296, in get_hf_file_metadata
r = _request_wrapper(
File "/Users/keepnoob/miniforge3/envs/facelock/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 280, in _request_wrapper
response = _request_wrapper(
File "/Users/keepnoob/miniforge3/envs/facelock/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 304, in _request_wrapper
hf_raise_for_status(response)
File "/Users/keepnoob/miniforge3/envs/facelock/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 481, in hf_raise_for_status
raise _format(HfHubHTTPError, str(e), response) from e
huggingface_hub.errors.HfHubHTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/minchul/cvlface_adaface_vit_base_kprpe_webface4m/resolve/main/files.txt (Request ID: Root=1-67e3ddf4-0468960502af5c9003d99953;0c73674d-5df2-4c45-a7ad-814541c1f761)
Invalid credentials in Authorization headerIt cannot build network connection to Huggingface or download the minchul/cvlface_adaface_vit_base_kprpe_webface4m and minchul/cvlface_DFA_mobilenet, while successfully download instruct-pix2pix from huggingface
Metadata
Metadata
Assignees
Labels
No labels