huggingface / parler-tts

Inference and training library for high-quality TTS models.
Apache License 2.0
2.6k stars 265 forks source link

Don't use deprecated `Repository` #18

Closed Wauplin closed 5 days ago

Wauplin commented 1 month ago

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

ylacombe commented 1 month ago

Hey @Wauplin, thanks for the PR, I'll check that it works before merging this!

I actually didn't run linter on the newest version, I'll make sure to do it once after merging this PR

Wauplin commented 1 month ago

Thanks for the review and thanks for testing @ylacombe! Feel free to merge whenever you want/it's ready :)

ylacombe commented 5 days ago

Many thanks for the PR @Wauplin! I've superseded the PR because we had some import issues!