[serge] Fix 2 integration tests for model `seamless_m4t_v2` failing with `output_mismatch` (list output differs (2)) (#48553)
* [serge] Fix 2 integration tests for model `seamless_m4t_v2` failing with `output_mismatch` (list output differs (2))
* Fix the root cause instead of flattening the compared sequences
`test_to_rus_speech` did not fail because of a `squeeze()` quirk: #48425 changed the
`input_audio` fixture from `audio=[input_features.tolist()]` (one 2-channel sample,
batch size 1) to `audio=audio_array.tolist()` (two mono samples, batch size 2), so
`output.sequences` became `[2, N]` and `tolist()` nested. Flattening cannot make the
test pass -- it produces 2N tokens against an 8-token expectation -- and the two
following assertions on `unit_sequences` and `waveform` stay nested as well.
Restore the batch-1 input the expected values were computed with. The sample is passed
as a tensor because `make_list_of_audio` (the validation that made #48425 necessary)
only accepts arrays, tensors or lists of floats, not a triply-nested list. The
resulting `input_features` are bit-identical to the pre-#48425 ones (verified: both
`(1, 62, 160)`, `torch.equal` on features and attention mask).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: serge[bot] <serge[bot]@users.noreply.github.com>
Co-authored-by: Tarek Ziade <tarek@ziade.org>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>