parler-tts icon indicating copy to clipboard operation
parler-tts copied to clipboard

Don't use deprecated `Repository`

Open Wauplin opened this issue 4 months ago • 2 comments

Repository is a deprecated feature in huggingface_hub. It is more robust to use the HTTP-based methods from HfApi instead. Here is a doc page explaining why it's better. Main reasons are 1. don't need to clone a repo to push files 2. faster upload speed 3. don't need git/git+lfs configured locally.

transformers switched to use HfApi is all their training scripts in Aug 23' (see https://github.com/huggingface/transformers/pull/25095) without breaking. Let's do the same for parler-tts!

Disclaimer: I did not test those changes myself. Should be fine though.

(Sorry for the import sorting changes. Hope that's fine with you, otherwise I can revert. It is a ruff format . side-effect)

Similar PRs: https://github.com/huggingface/peft/pull/1641 https://github.com/huggingface/accelerate/pull/2658

Wauplin avatar Apr 12 '24 07:04 Wauplin