From 3bf025c49d6179c13cbf4ab48826289c4b7d86ff Mon Sep 17 00:00:00 2001 From: chaofengw Date: Thu, 10 Sep 2026 05:08:20 +0000 Subject: [PATCH] fix(personaplex): declare reference einops dependency Match the einops version required by the pinned official Moshi source. Exercise real reference imports through the existing subprocess entrypoint before checkpoint validation, without model downloads or GPU execution. Signed-off-by: chaofengw --- families/personaplex/requirements.txt | 2 ++ .../tests/test_official_reference.py | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/families/personaplex/requirements.txt b/families/personaplex/requirements.txt index 4b6f57262d..eb024b6d84 100644 --- a/families/personaplex/requirements.txt +++ b/families/personaplex/requirements.txt @@ -1,4 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# Match the tensor rearrangement dependency in the pinned official Moshi source. +einops==0.7.0 soundfile diff --git a/families/personaplex/tests/test_official_reference.py b/families/personaplex/tests/test_official_reference.py index 05b8dbcc1a..b14c2fcf36 100644 --- a/families/personaplex/tests/test_official_reference.py +++ b/families/personaplex/tests/test_official_reference.py @@ -51,6 +51,27 @@ def test_audio_compat_reads_the_checked_in_float_wav() -> None: sphn.resample(audio, src_sample_rate=24_000, dst_sample_rate=16_000) +def test_official_reference_imports_before_checkpoint_validation(tmp_path: Path) -> None: + if not os.environ.get(official_reference.SOURCE_ENVIRONMENT): + pytest.skip("official source checkout is required for the reference import smoke test") + model_dir = tmp_path / "empty_model" + model_dir.mkdir() + input_wav = tmp_path / "input.wav" + _write_wav(input_wav) + + # Exercise the real subprocess imports without downloading weights or using a GPU. + # Missing dependencies must fail here instead of being mistaken for a model error. + with pytest.raises(RuntimeError, match="checkpoint is missing official weights"): + official_reference.generate( + model_dir, + input_wav, + tmp_path / "output", + max_frames=1, + precision="bf16", + timeout_s=60, + ) + + def test_generate_runs_the_official_source_and_requires_live_outputs( monkeypatch, tmp_path: Path ) -> None: