VibeVoice icon indicating copy to clipboard operation
VibeVoice copied to clipboard

CUDA OOM with just 1 minutes audio

Open zshnb opened this issue 10 months ago • 10 comments

OS: Ubuntu 22.04 CUDA: 12.4 Torch: 2.8.0 Python: 3.13

I use demo/vibevoice_asr_inference_from_file.py to run a 1 minutes long audio, it report CUDA out of memory, is it a bug or it need too much GPU memory?

zshnb avatar Jan 26 '26 06:01 zshnb

I've tried for several hours, with chat gpt's help reducing the size of tokens, down and down and down, but it simply won't fit into 24GB of VRAM. Even if it did run with say 30 seconds of audio, that then becomes too much of a limitation to be in any way useful. It should perhaps be clearer that ASR isn't for domestic GPUs. Going to try on Runpod though tomorrow. I think the model itself just won't fit in the amount of memory available, with any room left over for the rest of the stuff that's needed.

GeffersAtWork avatar Jan 27 '26 17:01 GeffersAtWork

Same here. 24GB of VRAM doesn't seem enough except for the smallest of files.

rlesac avatar Feb 02 '26 12:02 rlesac

I did get this to work with an A100 on Runpod, seemed the cheapest solution. Wanted to try a 5090, but they never seem to be available. It was quick and painless, just following instructions, and early signs are very promising.

GeffersAtWork avatar Feb 02 '26 12:02 GeffersAtWork

I just tested on a L10 with 48G memory machine, the result is:

  • 1 hour audio, cost 11 minutes, 34G memory
  • 30 minutes audio, cost 5 minutes, 27G memory

zshnb avatar Feb 03 '26 04:02 zshnb

Can you share: GPU model, dtype (fp16/bf16), chunk size / max tokens, and whether it’s batching windows? If you paste the command + key params, I can estimate VRAM per minute and tell you the cheapest GPU class on the cloud that will handle 60 min reliably.

ai-singhal avatar Feb 04 '26 06:02 ai-singhal

GPU: L20, dtype: bf16, others setting are default in demo script

zshnb avatar Feb 04 '26 06:02 zshnb

I think the OOM on 1 minute is mostly caused by the demo script defaults, not the audio. In demo/vibevoice_asr_inference_from_file.py, --max_new_tokens defaults to 32768, which makes generate() allocate a massive KV-cache even for short inputs.

Can you try --batch_size 1 --max_new_tokens 512 (or 1024) and report VRAM? Also note batching + padding=True pads all samples to the longest sequence in the batch, which can explode memory for mixed durations.

Suggested run: --batch_size 1 --max_new_tokens 512 --attn_implementation flash_attention_2 (or sdpa if flash-attn isn’t installed).

ai-singhal avatar Feb 04 '26 19:02 ai-singhal

I change max_new_tokens to 1024, then transcribe a 30 minutes audio, it still need 27G GPU memory

zshnb avatar Feb 05 '26 11:02 zshnb

btw, when model loaded, it use about 22G gpu memory

zshnb avatar Feb 12 '26 04:02 zshnb

Submitted a fix in https://github.com/microsoft/VibeVoice/pull/276. Adds a duration check to vibevoice_audio_input_mapper in vllm_plugin/inputs.py that returns a clear ValueError before the model processes audio that exceeds the configured limit. Configurable via VIBEVOICE_MAX_AUDIO_DURATION env var (default 3660s).

mvanhorn avatar Mar 30 '26 14:03 mvanhorn