mstar.model.cosmos3.tests.test_sound#
Tests for the Cosmos3 opt-in sound generation path.
CPU-safe unit tests cover the sound segment packing (mrope band, indexes,
position ids), the duration -> latent-frame math, the request-level validation
and walk selection, a tiny AVAE decoder shape check, and the decoder-subset
checkpoint load. GPU tests (gated on COSMOS3_NANO_DIR + CUDA) check the
engine cache-once [video | sound] loop against the fused reference pipeline —
bit-tight with the sdpa handle, PSNR-level with FlashInfer — and smoke the
real checkpoint sound tokenizer.
Run CPU only: python3 test_sound.py Run with GPU: COSMOS3_NANO_DIR=<snap> python3 test_sound.py
Functions
- mstar.model.cosmos3.tests.test_sound.test_sound_cache_once_matches_fused_exact()[source]#
- Return type:
None