It's mostly torch, I think. It pulls in NVIDIA libs (which … makes sense, I guess), and NVIDIA is just not at all judicious when it comes to disk space. I literally run out of disk trying to install this on Linux.
On macOS, it's a markedly different experience: it's only ~700 MiB there; I'm assuming b/c no NVIDIA libs get pulled in, b/c why would they.
For anyone who might want to play around with this: I can get down to ~3 GiB (& about 1.3 GiB if you wipe your uv cache afterwards) on Linux if I add the following to the end of `pyproject.toml`:
[tool.uv.sources]
# This tells uv to use the specific index for torch, torchvision, and torchaudio
torch = [
{index = "pytorch-cpu"}
]
torchvision = [
{index = "pytorch-cpu"}
]
torchaudio = [
{index = "pytorch-cpu"}
]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
& add "torch" to the direct dependencies, b/c otherwise it seems like uv is ignoring the source? (… which of course downloads a CPU-only torch.)
That's not all the libraries, either, but you can see NVIDIA here is easily over 1 GiB.
It also then crashes for me, with:
File "KittenTTS/.venv/lib/python3.14/site-packages/pydantic/v1/fields.py", line 576, in _set_default_and_type
raise errors_.ConfigError(f'unable to infer type for attribute "{self.name}"')
pydantic.v1.errors.ConfigError: unable to infer type for attribute "REGEX"
Which seems to be [this bug in spacey](https://github.com/explosion/spaCy/issues/13895), so I'm going to have to try adding `<3.14` to `requires-python` in `pyproject.toml` too I think. That is, for anyone wanting to try this out:
(This isn't really something KittenTTS should have to do, since this is a bug in spacey … and ideally, at some point, spacey will fix it.)
Also:
+ curated-tokenizers==0.0.9
This version is so utterly ancient that there aren't wheels for it anymore, so that means a loooong wait while this builds. It's pulled in via misaki, and my editor says your one import of misaki is unused.
Hilariously, removing it breaks but only on macOS machine. I think you're using it solely for the side-effect that it tweaks phonemizer to use espeakng, but you can just do that tweak yourself, & then I think that dependency can be dropped. That drops a good number of dependencies & really speeds up the installation since we're not compiling a bunch of stuff.
You need to add `phonemizer-fork` to your dependencies. (If you remove misaki, you'll find this missing.)
On macOS, it's a markedly different experience: it's only ~700 MiB there; I'm assuming b/c no NVIDIA libs get pulled in, b/c why would they.
For anyone who might want to play around with this: I can get down to ~3 GiB (& about 1.3 GiB if you wipe your uv cache afterwards) on Linux if I add the following to the end of `pyproject.toml`:
& add "torch" to the direct dependencies, b/c otherwise it seems like uv is ignoring the source? (… which of course downloads a CPU-only torch.)This is an example of what one sees under Linux:
That's not all the libraries, either, but you can see NVIDIA here is easily over 1 GiB.It also then crashes for me, with:
Which seems to be [this bug in spacey](https://github.com/explosion/spaCy/issues/13895), so I'm going to have to try adding `<3.14` to `requires-python` in `pyproject.toml` too I think. That is, for anyone wanting to try this out: (This isn't really something KittenTTS should have to do, since this is a bug in spacey … and ideally, at some point, spacey will fix it.)Also:
This version is so utterly ancient that there aren't wheels for it anymore, so that means a loooong wait while this builds. It's pulled in via misaki, and my editor says your one import of misaki is unused.Hilariously, removing it breaks but only on macOS machine. I think you're using it solely for the side-effect that it tweaks phonemizer to use espeakng, but you can just do that tweak yourself, & then I think that dependency can be dropped. That drops a good number of dependencies & really speeds up the installation since we're not compiling a bunch of stuff.
You need to add `phonemizer-fork` to your dependencies. (If you remove misaki, you'll find this missing.)