News for hackers. Stuff that matters.
Re:StyleTTS2 – open-source Eleven Labs quality Text To Speech by stevenhuang on Sunday November 19, 2023 @03:05PM (#38337240)
I really want to try this but making the venv to install all the torch dependencies is starting to get old lol.

How are other people dealing with this? Is there an easy way to get multiple venvs to share like a common torch venv? I can do this manually but I'm wondering if there's a tool out there that does this.

Re:StyleTTS2 – open-source Eleven Labs quality Text To Speech by eurekin on Sunday November 19, 2023 @03:44PM (#38337693)
Same here. I'm using conda and eyeing simply installing a pytorch into the base conda env
Re:StyleTTS2 – open-source Eleven Labs quality Text To Speech by lhl on Sunday November 19, 2023 @05:13PM (#38338882)
I don't think "base" works like that (while it can be a fallback for some dependencies, afaik, Python packages are isolated/not in path). But even if you could, don't do it. Different packages usually have different pytorch dependencies (often CUDA as well) and it will definitely bite you.

The biggest optimization I've found is to use mamba for everything. It's ridiculously faster than conda for package resolution. With everything cached, you're mostly just waiting for your SSD at that point.

(I suppose you could add the base env's lib path to the end of your PYTHONPATH, but that sounds like a sure way to get bitten by weird dependency/reproducibility issues down the line.)

Re:StyleTTS2 – open-source Eleven Labs quality Text To Speech by eurekin on Sunday November 19, 2023 @06:13PM (#38339619)
Thank you! First time I come across. Looks very promising
Re:StyleTTS2 – open-source Eleven Labs quality Text To Speech by wczekalski on Sunday November 19, 2023 @03:09PM (#38337279)
I use nix to setup the python env (python version + poetry + sometimes python packages that are difficult to install with poetry) and use poetry for the rest.

The workflow is:

  > nix flake init -t github:dialohq/flake-templates#python
  > nix develop -c $SHELL
  > # I'm in the shell with poetry env, I have a shell hook in the nix devenv that does poetry install and poetry activate.
Re:StyleTTS2 – open-source Eleven Labs quality Text To Speech by lukasga on Sunday November 19, 2023 @03:38PM (#38337610)
Can relate to this problem a lot. I have considered starting using a Docker dev container and making a base image for shared dependencies which I then can customize in a dockerfile for each new project, not sure if there's a better alternative though.
Re:StyleTTS2 – open-source Eleven Labs quality Text To Speech by stevenhuang on Monday November 20, 2023 @01:39AM (#38343476)
Yeah there is the official Nvidia container with torch+cuda pre-installed that some projects use.

I feel more projects should start with that as the base instead of pinning on whatever variants. Most aren't using specialized CUDA kernels after all.

Suppose there's the answer, just pick the specific torch+CUDA base that matches the major version of the project you want to run. Then cross your fingers and hope the dependencies mesh :p.

Re:StyleTTS2 – open-source Eleven Labs quality Text To Speech by stavros on Sunday November 19, 2023 @05:47PM (#38339317)
I generally try to use Docker for this stuff, but yeah, it's the main reason why I pass on these, even though I've been looking for something like this. It's just too hard to figure out the dependencies.
Re:StyleTTS2 – open-source Eleven Labs quality Text To Speech by amelius on Sunday November 19, 2023 @07:30PM (#38340408)
> is starting to get old lol.

If it's starting to get old, then this means that an LLM like Copilot should be able to do it for you, no?

Re:StyleTTS2 – open-source Eleven Labs quality Text To Speech by stevenhuang on Monday November 20, 2023 @01:20AM (#38343308)
I mean that I already have like 10 different torch venvs for different projects all with various pinned versions and CUDA variants.

Still worth the trade-off of not having to deal with dependency hell, but you start to wonder if there is a better way. All together this is many GBs of duplicated libs, wasted bandwidth and compute.