From e88203e1abd98dd103a1e3dfdd884a2353c4df3b Mon Sep 17 00:00:00 2001 From: haosenwang1018 Date: Mon, 23 Feb 2026 10:05:11 +0800 Subject: [PATCH 1/2] fix: skip config.json download counter when HF_HUB_OFFLINE is set The hf_hub_download call for config.json (used only to increment the download counter) fails when HF_HUB_OFFLINE=1. Guard the call with an environment variable check. Fixes #54 Signed-off-by: haosenwang1018 --- moshi/moshi/server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/moshi/moshi/server.py b/moshi/moshi/server.py index 771f491d..a2e596d5 100644 --- a/moshi/moshi/server.py +++ b/moshi/moshi/server.py @@ -426,7 +426,9 @@ def main(): # Download config.json to increment download counter # No worries about double-counting since config.json will be cached the second time - hf_hub_download(args.hf_repo, "config.json") + # Skip when running in offline mode (HF_HUB_OFFLINE=1) + if not os.environ.get("HF_HUB_OFFLINE"): + hf_hub_download(args.hf_repo, "config.json") logger.info("loading mimi") if args.mimi_weight is None: From a6de001daa4f3a93fe0c202fc2cb062f3deccafd Mon Sep 17 00:00:00 2001 From: haosenwang1018 Date: Mon, 23 Feb 2026 10:05:45 +0800 Subject: [PATCH 2/2] fix: remove torch upper bound to support Python 3.13 torch < 2.5 only has wheels for Python 3.10-3.12. Python 3.13 users cannot install the package. Remove the upper bound since torch >= 2.5 maintains backward compatibility. Fixes #22 Signed-off-by: haosenwang1018 --- moshi/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moshi/pyproject.toml b/moshi/pyproject.toml index ead71e9c..bd20d1a5 100644 --- a/moshi/pyproject.toml +++ b/moshi/pyproject.toml @@ -10,7 +10,7 @@ dependencies = [ "sentencepiece == 0.2", "sounddevice == 0.5", "sphn >= 0.1.4, < 0.2", - "torch >= 2.2.0, < 2.5", + "torch >= 2.2.0", "aiohttp>=3.10.5, <3.11", ] authors = [{name="Rajarshi Roy", email="rajarshir@nvidia.com"}]