Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
fix(longcat): install onnxruntime-gpu so the vocal separator imports at job start
nirholase10f35e10069
diff --git a/workers/longcat/check_pins.py b/workers/longcat/check_pins.pyindex 33dbce12b..7160c487a 100644--- a/workers/longcat/check_pins.py+++ b/workers/longcat/check_pins.py@@ -5,6 +5,14 @@ own torch and numpy requirements, and without this gate a transitive resolutionthat swapped the cu124 wheel for a CPU-only build would only surface atinference time, as "Torch not compiled with CUDA enabled", after a 40-minutebuild had already reported success.++It also proves the avatar script's import chain resolves. LongCat's+run_demo_avatar_single_audio_to_video.py imports+`audio_separator.separator.Separator` at module scope, and that module imports+`onnxruntime`, which audio-separator only declares behind an optional extra.+Without the explicit onnxruntime-gpu pin, the image built green and every+avatar job died with ModuleNotFoundError before rendering a frame. Listing the+execution providers needs no GPU, so this runs on the CPU-only builder."""from __future__ import annotations@@ -50,6 +58,34 @@ if hub_parts < HUB_FLOOR:f"{'.'.join(str(n) for n in HUB_FLOOR)} floor diffusers {diffusers.__version__} requires")+# onnxruntime-gpu 1.20.x is the last line built for any CUDA 12.x with cuDNN 9;+# 1.21 and later need CUDA 12.8, newer than this image's 12.4 runtime. A CPU-only+# `onnxruntime` wheel arriving through some later extra would replace the module+# and silently drop the CUDA provider, so check both.+try:+ import onnxruntime+except ImportError as exc:+ providers = []+ failures.append(f"onnxruntime is not installed ({exc}); pin onnxruntime-gpu in requirements-model.txt")+else:+ providers = onnxruntime.get_available_providers()+ if not onnxruntime.__version__.startswith("1.20."):+ failures.append(+ f"onnxruntime drifted to {onnxruntime.__version__}, expected 1.20.x (CUDA 12.x + cuDNN 9 build)"+ )+ if "CUDAExecutionProvider" not in providers:+ failures.append(+ f"onnxruntime {onnxruntime.__version__} has no CUDAExecutionProvider ({providers}); "+ "a CPU-only onnxruntime wheel replaced onnxruntime-gpu"+ )++# The exact import the avatar script makes at module scope. A failure here is the+# one every job would otherwise hit first.+try:+ from audio_separator.separator import Separator # noqa: F401+except Exception as exc: # noqa: BLE001+ failures.append(f"audio_separator.separator does not import: {type(exc).__name__}: {exc}")+if failures:for line in failures:print(f"PIN DRIFT {line}", file=sys.stderr)@@ -63,4 +99,6 @@ print(f"transformers {transformers.__version__}",f"diffusers {diffusers.__version__}",f"huggingface-hub {huggingface_hub.__version__}",+ f"onnxruntime {onnxruntime.__version__} ({', '.join(providers)})",+ "audio_separator.separator ok",)diff --git a/workers/longcat/requirements-model.txt b/workers/longcat/requirements-model.txtindex 15358ba62..e09e2d683 100644--- a/workers/longcat/requirements-model.txt+++ b/workers/longcat/requirements-model.txt@@ -40,3 +40,13 @@ scipy==1.15.3pyloudnorm==0.1.1onnx==1.22.0audio-separator==0.30.2+# The runtime that executes the separator's Kim_Vocal_2.onnx. audio-separator+# only pulls one in through its [cpu]/[gpu] extras, so a plain install leaves+# `import onnxruntime` (separator.py, module scope) unresolvable and every+# avatar job dies with ModuleNotFoundError before the first frame. The GPU build+# provides the same `onnxruntime` module. 1.20.x specifically: it is the last+# onnxruntime-gpu line built for any CUDA 12.x with cuDNN 9 (1.21 and later+# require CUDA 12.8), which is what this image's CUDA 12.4.1 runtime base and the+# cuDNN 9 that torch 2.6.0+cu124 loads provide. check_pins.py asserts the version,+# the CUDA execution provider, and that the separator imports.+onnxruntime-gpu==1.20.2