From 91325233a4f03fdd28902c225b5aedb4ea18fd84 Mon Sep 17 00:00:00 2001 From: wachawo Date: Sat, 24 Jan 2026 23:31:23 +0000 Subject: [PATCH 1/3] Add PyTorch cu130 index to simplify installs --- moshi/pyproject.toml | 16 ++++++++++++++-- moshi/requirements.txt | 7 +++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/moshi/pyproject.toml b/moshi/pyproject.toml index ead71e9c..29d19aed 100644 --- a/moshi/pyproject.toml +++ b/moshi/pyproject.toml @@ -10,7 +10,9 @@ dependencies = [ "sentencepiece == 0.2", "sounddevice == 0.5", "sphn >= 0.1.4, < 0.2", - "torch >= 2.2.0, < 2.5", + "torch == 2.10.0", + "torchvision == 0.25.0", + "torchaudio == 2.10.0", "aiohttp>=3.10.5, <3.11", ] authors = [{name="Rajarshi Roy", email="rajarshir@nvidia.com"}] @@ -28,4 +30,14 @@ version = {attr = "moshi.__version__"} [build-system] requires = ["setuptools"] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta" + +[tool.uv.sources] +torch = [{ index = "pytorch-cu130" }] +torchvision = [{ index = "pytorch-cu130" }] +torchaudio = [{ index = "pytorch-cu130" }] + +[[tool.uv.index]] +name = "pytorch-cu130" +url = "https://download.pytorch.org/whl/cu130" +explicit = true diff --git a/moshi/requirements.txt b/moshi/requirements.txt index e0608228..9a0d7ab5 100644 --- a/moshi/requirements.txt +++ b/moshi/requirements.txt @@ -1,3 +1,7 @@ +--extra-index-url https://download.pytorch.org/whl/cu130 +torch==2.10.0+cu130 +torchvision==0.25.0+cu130 +torchaudio==2.10.0+cu130 numpy>=1.26,<2.2 safetensors>=0.4.0,<0.5 huggingface-hub>=0.24,<0.25 @@ -5,5 +9,4 @@ einops==0.7 sentencepiece==0.2 sounddevice==0.5 sphn>=0.1.4,<0.2 -torch>=2.2.0,<2.5 -aiohttp>=3.10.5,<3.11 \ No newline at end of file +aiohttp>=3.10.5,<3.11 From f73f3860178443223dc1e63fad3e6e02de912ecd Mon Sep 17 00:00:00 2001 From: wachawo Date: Sun, 25 Jan 2026 01:45:49 +0000 Subject: [PATCH 2/3] Add accelerate dependency to pyproject.toml and requirements.txt --- moshi/pyproject.toml | 1 + moshi/requirements.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/moshi/pyproject.toml b/moshi/pyproject.toml index 29d19aed..c28c12bc 100644 --- a/moshi/pyproject.toml +++ b/moshi/pyproject.toml @@ -14,6 +14,7 @@ dependencies = [ "torchvision == 0.25.0", "torchaudio == 2.10.0", "aiohttp>=3.10.5, <3.11", + "accelerate==1.12.0", ] authors = [{name="Rajarshi Roy", email="rajarshir@nvidia.com"}] maintainers = [{name="Rajarshi Roy", email="rajarshir@nvidia.com"}] diff --git a/moshi/requirements.txt b/moshi/requirements.txt index 9a0d7ab5..409d71d8 100644 --- a/moshi/requirements.txt +++ b/moshi/requirements.txt @@ -10,3 +10,4 @@ sentencepiece==0.2 sounddevice==0.5 sphn>=0.1.4,<0.2 aiohttp>=3.10.5,<3.11 +accelerate==1.12.0 From c0b83594ef6038ff0f6b5a822a9463fbf0703d2b Mon Sep 17 00:00:00 2001 From: wachawo Date: Sun, 25 Jan 2026 02:41:28 +0000 Subject: [PATCH 3/3] Installing without CUDA on macOS --- moshi/pyproject.toml | 16 ++++++++-------- moshi/requirements.txt | 11 +++++++---- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/moshi/pyproject.toml b/moshi/pyproject.toml index c28c12bc..2e357d31 100644 --- a/moshi/pyproject.toml +++ b/moshi/pyproject.toml @@ -10,11 +10,11 @@ dependencies = [ "sentencepiece == 0.2", "sounddevice == 0.5", "sphn >= 0.1.4, < 0.2", - "torch == 2.10.0", - "torchvision == 0.25.0", - "torchaudio == 2.10.0", - "aiohttp>=3.10.5, <3.11", - "accelerate==1.12.0", + "torch >= 2.9, < 2.11", + "torchaudio >= 2.9, < 2.11", + "torchvision >= 0.24, < 0.26", + "aiohttp >= 3.10.5, < 3.11", + "accelerate >= 1.12, < 1.13", ] authors = [{name="Rajarshi Roy", email="rajarshir@nvidia.com"}] maintainers = [{name="Rajarshi Roy", email="rajarshir@nvidia.com"}] @@ -34,9 +34,9 @@ requires = ["setuptools"] build-backend = "setuptools.build_meta" [tool.uv.sources] -torch = [{ index = "pytorch-cu130" }] -torchvision = [{ index = "pytorch-cu130" }] -torchaudio = [{ index = "pytorch-cu130" }] +torch = [{ index = "pytorch-cu130", marker = "sys_platform != 'darwin'" }] +torchvision = [{ index = "pytorch-cu130", marker = "sys_platform != 'darwin'" }] +torchaudio = [{ index = "pytorch-cu130", marker = "sys_platform != 'darwin'" }] [[tool.uv.index]] name = "pytorch-cu130" diff --git a/moshi/requirements.txt b/moshi/requirements.txt index 409d71d8..0997819d 100644 --- a/moshi/requirements.txt +++ b/moshi/requirements.txt @@ -1,7 +1,10 @@ --extra-index-url https://download.pytorch.org/whl/cu130 -torch==2.10.0+cu130 -torchvision==0.25.0+cu130 -torchaudio==2.10.0+cu130 +torch==2.10.0+cu130; sys_platform != "darwin" +torchaudio==2.10.0+cu130; sys_platform != "darwin" +torchvision==0.25.0+cu130; sys_platform != "darwin" +torch>=2.9,<2.11; sys_platform == "darwin" +torchaudio>=2.9,<2.11; sys_platform == "darwin" +torchvision>=0.25,<0.26; sys_platform == "darwin" numpy>=1.26,<2.2 safetensors>=0.4.0,<0.5 huggingface-hub>=0.24,<0.25 @@ -10,4 +13,4 @@ sentencepiece==0.2 sounddevice==0.5 sphn>=0.1.4,<0.2 aiohttp>=3.10.5,<3.11 -accelerate==1.12.0 +accelerate>=1.12,<1.13