You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: A small FLAC audio part decodes to gigabytes in trtllm-serve #20986
AudioMediaIO.load_base64 (tensorrt_llm/inputs/media_io.py) calls soundfile.read, which decodes the full clip to float64 before any model-side length check runs.
Expected behavior
The server rejects an audio input whose decoded size is far beyond what any model consumes, before allocating it.
Actual behavior
Measured with the real chat_utils.parse_chat_messages_coroutines and AudioMediaIO:
one part: 465 KiB in, 3.43 GiB float64 array out, peak RSS 3.98 GiB, 67 s and 84 s of decode in two runs
four audio_url data-URI parts in one request: 13.73 GiB decoded, peak RSS 14.29 GiB
A handful of such requests exhausts host memory on the serving process.
Additional notes
Remote media fetches are capped at 200 MiB of encoded bytes (_MAX_RESPONSE_BYTES). Nothing bounds the decoded audio size. A fix is ready that caps decoded samples per audio input.
Activity
[NVIDIA#20986][fix] Check the audio header before decoding
[NVIDIA#20986][fix] Cap decoded audio samples in AudioMediaIO
[NVIDIA#20986][fix] Check the audio header before decoding
[NVIDIA#20986][fix] Budget unknown-length audio decoding