Add Option to Download Weights Remotely in Swift TTS
For a better developer experience, we can add swift-transformers package to remotely download the weights with theirHub api to download model weights from Hugging Face Hub as an option API apart from having it locally.
I have done a implementation here: https://github.com/mlalma/kokoro-ios/pull/10
This can be done for Orpheus implementation as well.
Discussion with @Blaizzy: We only need 3 files from the package. Should we directly copy them or bloat the app with the package? Maybe that package will help further for more advanced download options
Nice!
Discussion with @Blaizzy: We only need 3 files from the package. Should we directly copy them or bloat the app with the package? Maybe that package will help further for more advanced download options
I'm inclined to have them pulled in to reduce the dependency surface area (I realize this is an uphill battle 😅) if the license allows it, unless we expect the original implementation to be changing frequently and updating the code would be a chore.
I'm inclined to have them pulled in to reduce the dependency surface area
Agreed. The package itself barely adds marginal time to the build as well, though. I doubt the HuggingFace API to fetch models will fetch anytime soon. I am not sure on the license of Apache 2.0, will have to add the notice to each file
I'm inclined to have them pulled in to reduce the dependency surface area
Agreed. The package itself barely adds marginal time to the build as well, though. I doubt the HuggingFace API to fetch models will fetch anytime soon. I am not sure on the license of Apache 2.0, will have to add the notice to each file
FWIW I was looking at MLX Swift again recently and it might be easier to just pull this in -- it's pretty small and has minimal dependencies that will get pulled in anyway if we reference MLXLLM on Swift.
FWIW I was looking at MLX Swift again recently and it might be easier to just pull this in -- it's pretty small and has minimal dependencies that will get pulled in anyway if we reference MLXLLM on Swift.
Agreed!