From 987395da37619cad343e076fee498281faf944cb Mon Sep 17 00:00:00 2001 From: OpenClaw Date: Tue, 7 Apr 2026 18:20:09 +0530 Subject: [PATCH 1/7] fix: return cleanup function from useEffect in Queue --- client/src/pages/Queue/Queue.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/pages/Queue/Queue.tsx b/client/src/pages/Queue/Queue.tsx index 7d0d44bb2..b6a4236ce 100644 --- a/client/src/pages/Queue/Queue.tsx +++ b/client/src/pages/Queue/Queue.tsx @@ -141,7 +141,7 @@ export const Queue:FC = () => { if(env.VITE_ENV === "development") { eruda.init(); } - () => { + return () => { if(env.VITE_ENV === "development") { eruda.destroy(); } From 0770e935587f1790f9e92afda1dbaa7e671f448a Mon Sep 17 00:00:00 2001 From: OpenClaw Date: Tue, 7 Apr 2026 18:20:21 +0530 Subject: [PATCH 2/7] fix: remove useMemo from non-hook buildURL function --- client/src/pages/Conversation/Conversation.tsx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/client/src/pages/Conversation/Conversation.tsx b/client/src/pages/Conversation/Conversation.tsx index 4c7711a08..fdddda0bf 100644 --- a/client/src/pages/Conversation/Conversation.tsx +++ b/client/src/pages/Conversation/Conversation.tsx @@ -44,14 +44,11 @@ const buildURL = ({ textSeed: number; audioSeed: number; }) => { - const newWorkerAddr = useMemo(() => { - if (workerAddr == "same" || workerAddr == "") { - const newWorkerAddr = window.location.hostname + ":" + window.location.port; - console.log("Overriding workerAddr to", newWorkerAddr); - return newWorkerAddr; - } - return workerAddr; - }, [workerAddr]); + let newWorkerAddr = workerAddr; + if (workerAddr === "same" || workerAddr === "") { + newWorkerAddr = window.location.hostname + ":" + window.location.port; + console.log("Overriding workerAddr to", newWorkerAddr); + } const wsProtocol = (window.location.protocol === 'https:') ? 'wss' : 'ws'; const url = new URL(`${wsProtocol}://${newWorkerAddr}/api/chat`); if(workerAuthId) { From 755f715814010158cb7e86e747577cd298ede90f Mon Sep 17 00:00:00 2001 From: OpenClaw Date: Tue, 7 Apr 2026 18:20:35 +0530 Subject: [PATCH 3/7] fix: only fire onDisconnect for the current socket --- client/src/pages/Conversation/hooks/useSocket.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/client/src/pages/Conversation/hooks/useSocket.ts b/client/src/pages/Conversation/hooks/useSocket.ts index 8e7d43fb7..3408afc09 100644 --- a/client/src/pages/Conversation/hooks/useSocket.ts +++ b/client/src/pages/Conversation/hooks/useSocket.ts @@ -33,12 +33,7 @@ export const useSocket = ({ const onDisconnect = useCallback((event: CloseEvent) => { const closedSocket = event.target as WebSocket; - console.log("disconnected"); - setSocketStatus("disconnected"); - if (onDisconnectProp) { - onDisconnectProp(); - } - // ONLY clear socketRef.current if it's the one that closed + // Only act on the current socket; ignore stale connections if (socketRef.current === closedSocket) { console.log("disconnected (current socket)"); socketRef.current = null; From 7818c66c4b388c20ec710bf5edb405270fb5ee6d Mon Sep 17 00:00:00 2001 From: OpenClaw Date: Tue, 7 Apr 2026 18:20:52 +0530 Subject: [PATCH 4/7] fix: use f-strings instead of printf-style print calls --- moshi/moshi/models/loaders.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/moshi/moshi/models/loaders.py b/moshi/moshi/models/loaders.py index d38dcc3bb..c2351db59 100644 --- a/moshi/moshi/models/loaders.py +++ b/moshi/moshi/models/loaders.py @@ -220,7 +220,7 @@ def get_moshi_lm( for name, tensor in list(state_dict.items()): if "depformer" in name and "self_attn" in name and name in model_sd: if tensor.shape != model_sd[name].shape: - print("Expanding %s", name) + print(f"Expanding {name}") missing = ( tensor if copy_missing_weights @@ -241,14 +241,14 @@ def get_moshi_lm( if needle in name: src = name.replace(needle, f"{rep}.{old}.") if src in state_dict: - print("Replacing %s <- %s", name, src) + print(f"Replacing {name} <- {src}") state_dict[name] = state_dict[src] replaced = True break if replaced: break if not replaced: - print("Missing %s", name) + print(f"Missing {name}") # Assign weights to target device dev = torch.device(device) if isinstance(device, str) else device From dc2521e6402d6ff6fcea1744935ef1ff01d05200 Mon Sep 17 00:00:00 2001 From: OpenClaw Date: Tue, 7 Apr 2026 18:20:56 +0530 Subject: [PATCH 5/7] fix: rename .eslinrc.json to .eslintrc.json --- client/{.eslinrc.json => .eslintrc.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename client/{.eslinrc.json => .eslintrc.json} (100%) diff --git a/client/.eslinrc.json b/client/.eslintrc.json similarity index 100% rename from client/.eslinrc.json rename to client/.eslintrc.json From 6c8c8ebfb39cb7ff516c860b60a0d3bc039ea3d7 Mon Sep 17 00:00:00 2001 From: OpenClaw Date: Tue, 7 Apr 2026 18:21:21 +0530 Subject: [PATCH 6/7] fix: skip analytics download when HF_HUB_OFFLINE is set --- 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 771f491da..f5af23c99 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") + # Increment HF download counter (analytics only, skip in offline mode) + 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 56ba4843821cd747b558cdc530ee6fce26bb6b9a Mon Sep 17 00:00:00 2001 From: OpenClaw Date: Tue, 7 Apr 2026 18:21:35 +0530 Subject: [PATCH 7/7] fix: relax torch and aiohttp upper bounds for Python 3.13 and Blackwell support --- moshi/pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moshi/pyproject.toml b/moshi/pyproject.toml index ead71e9c1..a61259f07 100644 --- a/moshi/pyproject.toml +++ b/moshi/pyproject.toml @@ -10,8 +10,8 @@ dependencies = [ "sentencepiece == 0.2", "sounddevice == 0.5", "sphn >= 0.1.4, < 0.2", - "torch >= 2.2.0, < 2.5", - "aiohttp>=3.10.5, <3.11", + "torch >= 2.2.0", + "aiohttp>=3.10.5", ] authors = [{name="Rajarshi Roy", email="rajarshir@nvidia.com"}] maintainers = [{name="Rajarshi Roy", email="rajarshir@nvidia.com"}]