jaeyeonkim99 / EnCLAP

Official Implementation of EnCLAP (ICASSP 2024)
MIT License
88 stars 5 forks source link

Authentication issue with Hugging Face #3

Closed plaffitte closed 5 months ago

plaffitte commented 6 months ago

When running the inference.py script locally on a local audio file, I get an authentication error from huggingface:

If this is a private repository, make sure to pass a token having permission to this repo withuse_auth_tokenor log in withhuggingface-cli loginand passuse_auth_token=True.

I have created a conda env and installed the packages in requirements.txt. I am only running the following command

python inference.py --ckpt checkpoint_directory_with_config --clap_ckpt clap_ckpt_path --input output-audio.wav

jaeyeonkim99 commented 6 months ago

Sorry for the delayed response.

Could you provide more details about the error you're encountering?

If the error is related to loading the BART model, you can refer to the following link for assistance: https://stackoverflow.com/questions/73117866/bart-loading-from-huggingface-requires-logging-in

If the error is related to accessing codes and models from our gradio demo repository, please try moving the released pretrained checkpoints into a local directory and attempt again.

Thank you.

plaffitte commented 6 months ago

Hi, no worries, thanks for getting back. I get two errors:

Repository Not Found for url: https://huggingface.co/checkpoint_directory_with_config/resolve/main/config.json. Please make sure you specified the correctrepo_idandrepo_type. If you are trying to access a private or gated repo, make sure you are authenticated.

And:

OSError: checkpoint_directory_with_config is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models' If this is a private repository, make sure to pass a token having permission to this repo withuse_auth_tokenor log in withhuggingface-cli loginand passuse_auth_token=True.

jaeyeonkim99 commented 6 months ago

You need to replace "checkpoint_directory_with_confg" and "clap_ckpt_path" with appropriate local paths to run the inference. For example, the command should be like python inference.py --ckpt pretrained/audicaps/base --clap_ckpt_path 630k-audioset-fusion-best.pt --input birds_chirping.wav

plaffitte commented 6 months ago

Ah ok I'm sorry I didn't realize I needed to have the checkpoints downloaded locally... Thanks a lot for your help.