Repository navigation
Description
I have a RTX 5070 12GB and 32GB RAM. But the terminal always report error like: GGML_ASSERT(ctx->mem_buffer != NULL) failed.
And I don't know the reason and the way to fix it.
(This is the command.)
PS D:\InstallDetails\IndexTTS\CppVersion\audiocpp-windows-cuda-balance-ea4d039> .\audiocpp_cli.exe --task clon --family index_tts2 --backend cuda --model "D:\Models\indextts\IndexTTS2-GGUF\index-tts2-q8_0.gguf" --text "你下载的 Base 模型文件齐全,接下来就可以进行声音克隆了。" --voice-ref "D:\Models\gpt-sovits\v2\原神\2-已有模型\艾尔海森\相当于把许多大脑链接在一起,为不同的人适配不同的思考内容.wav" --reference-text "相当于把许多大脑链接在一起,为不同的人适配不同的思考内容" --out "D:\Videos\20260727_output.wav" --log --num-beams 1
(And this is the output.)
[TRACE ts=20260729-132115] runtime.model.family index_tts2
[TRACE ts=20260729-132115] runtime.model.variant 2.0
[TRACE ts=20260729-132115] runtime.model.root C:\Users\72802\AppData\Local\Temp\audiocpp-gguf\187b456a8ce43701
[TRACE ts=20260729-132115] runtime.model.discovered_config_count 11
[TRACE ts=20260729-132115] runtime.model.discovered_weight_count 10
[TRACE ts=20260729-132115] runtime.model.task_count 2
[TRACE ts=20260729-132115] runtime.model.language_count 2
[TRACE ts=20260729-132115] runtime.model.supports_speaker_reference 1
[TRACE ts=20260729-132115] runtime.model.supports_style_condition 1
[TRACE ts=20260729-132115] runtime.model.supports_timestamps 0
ggml_cuda_init: found 1 CUDA devices (Total VRAM: 12226 MiB):
Device 0: NVIDIA GeForce RTX 5070, compute capability 12.0, VMM: yes, VRAM: 12226 MiB
[TIMING ts=20260729-132121] index_tts2.gpt.prefill.graph.build_ms 1.7564
[TRACE ts=20260729-132121] index_tts2.gpt.prefill.prompt_steps 87
[TRACE ts=20260729-132121] index_tts2.gpt.decode.state_buffer_mib 744.37841796875
[TIMING ts=20260729-132121] index_tts2.gpt.decode.graph.build_ms 23.4291
[TRACE ts=20260729-132121] index_tts2.gpt.decode.cache_steps 1588
[TRACE ts=20260729-132121] index_tts2.gpt.decode.beam_batch 1
[warning][audio.resample.soxr] audio libsoxr resampling unavailable; falling back to fallback resampling: library was not found
[TIMING ts=20260729-132121] index_tts2.wav2vec2bert.graph.build_ms 2.0171
[TRACE ts=20260729-132121] index_tts2.wav2vec2bert.frames 250
[TIMING ts=20260729-132121] index_tts2.wav2vec2bert.input_upload_ms 1.577
[TIMING ts=20260729-132121] index_tts2.wav2vec2bert.graph.compute_ms 132.5522
[TIMING ts=20260729-132121] index_tts2.wav2vec2bert.output_read_ms 0.3519
[TIMING ts=20260729-132122] index_tts2.semantic_codec.quantize.graph.build_ms 352.2211
[TRACE ts=20260729-132122] index_tts2.semantic_codec.quantize.frames 250
[TIMING ts=20260729-132122] index_tts2.semantic_codec.quantize.input_upload_ms 0.4614
[TIMING ts=20260729-132122] index_tts2.semantic_codec.quantize.graph.compute_ms 72.3214
[TIMING ts=20260729-132122] index_tts2.semantic_codec.quantize.output_read_ms 0.3607
[TRACE ts=20260729-132122] index_tts2.s2mel.reference_mel_frames 432
[TIMING ts=20260729-132122] index_tts2.s2mel.length_regulator.graph.build_ms 169.9396
[TRACE ts=20260729-132122] index_tts2.s2mel.length_regulator.input_frames 250
[TRACE ts=20260729-132122] index_tts2.s2mel.length_regulator.output_frames 432
[TIMING ts=20260729-132122] index_tts2.s2mel.length_regulator.input_upload_ms 0.3185
[TIMING ts=20260729-132122] index_tts2.s2mel.length_regulator.graph.compute_ms 3.8856
[TIMING ts=20260729-132122] index_tts2.s2mel.length_regulator.output_read_ms 11.6194
[TRACE ts=20260729-132122] index_tts2.speaker_cache.hit 0
[TRACE ts=20260729-132122] index_tts2.speaker_cache.slots 1
[TRACE ts=20260729-132122] index_tts2.speaker_cache.entries 1
[TRACE ts=20260729-132122] index_tts2.speaker_cache.evicted 0
[TIMING ts=20260729-132122] index_tts2.speaker_state_ms 873.0926
[TRACE ts=20260729-132122] index_tts2.emotion_audio.same_as_speaker 1
[warning][audio.resample.soxr] audio libsoxr resampling unavailable; falling back to fallback resampling: library was not found
[warning][audio.resample.soxr] audio libsoxr resampling unavailable; falling back to fallback resampling: library was not found
[TIMING ts=20260729-132122] index_tts2.wav2vec2bert.input_upload_ms 1.688
ggml_backend_cuda_graph_compute: CUDA graph warmup complete
[TIMING ts=20260729-132122] index_tts2.wav2vec2bert.graph.compute_ms 31.3132
[TIMING ts=20260729-132122] index_tts2.wav2vec2bert.output_read_ms 0.5594
[TRACE ts=20260729-132122] index_tts2.emotion_cache.hit 0
[TRACE ts=20260729-132122] index_tts2.emotion_cache.slots 1
[TRACE ts=20260729-132122] index_tts2.emotion_cache.entries 1
[TRACE ts=20260729-132122] index_tts2.emotion_cache.evicted 0
[TIMING ts=20260729-132122] index_tts2.emotion_state_ms 65.0748
[TIMING ts=20260729-132122] index_tts2.gpt.emo_condition.graph.build_ms 132.1197
[TRACE ts=20260729-132122] index_tts2.gpt.emo_condition.frames 250
[TIMING ts=20260729-132122] index_tts2.gpt.emo_condition.input_upload_ms 3.0121
[TIMING ts=20260729-132122] index_tts2.gpt.emo_condition.graph.compute_ms 33.2036
[TIMING ts=20260729-132122] index_tts2.gpt.emo_condition.output_read_ms 0.0868
[TIMING ts=20260729-132122] index_tts2.gpt.emo_condition.input_upload_ms 0.3034
ggml_backend_cuda_graph_compute: CUDA graph warmup complete
[TIMING ts=20260729-132122] index_tts2.gpt.emo_condition.graph.compute_ms 7.8044
[TIMING ts=20260729-132122] index_tts2.gpt.emo_condition.output_read_ms 0.0695
[TIMING ts=20260729-132122] index_tts2.gpt.emotion_vector.graph.build_ms 139.0197
ggml_backend_cuda_graph_compute: CUDA graph warmup complete
F:\audio.cpp\external\ggml\src\ggml.c:1611: GGML_ASSERT(ctx->mem_buffer != NULL) failed
Activity
0xShug0 commentedon Jul 29, 2026
@ssszzc Could you share the reference voice?
ssszzc commentedon Jul 29, 2026
相当于把许多大脑链接在一起,为不同的人适配不同的思考内容.wav
0xShug0 commentedon Jul 29, 2026
@ssszzc In my test on Linux, the peak VRAM is 7GB so I doubt VRAM is the issue. It looks like a Windows CPU-side issue caused by behavioral differences between Windows and Linux, triggered by this code path. I'll check tomorrow.
issue151_output.wav
ssszzc commentedon Jul 29, 2026
Thanks a lot. I look forward to your further reply.
0xShug0 commentedon Jul 29, 2026
@ssszzc Found the root cause. Could you try pass
--session-option index_tts2.weight_context_mb=32?.\audiocpp_cli.exe --task clon --family index_tts2 --backend cuda --model "D:\Models\indextts\IndexTTS2-GGUF\index-tts2-q8_0.gguf" --text "你下载的 Base 模型文件齐全,接下来就可以进行声音克隆了。" --voice-ref "D:\Models\gpt-sovits\v2\原神\2-已有模型\艾尔海森\相当于把许多大脑链接在一起,为不同的人适配不同的思考内容.wav" --reference-text "相当于把许多大脑链接在一起,为不同的人适配不同的思考内容" --out "D:\Videos\20260727_output.wav" --log --num-beams 1 --session-option index_tts2.weight_context_mb=32[-]Memory allocation failed ?[/-][+]IndexTTS2 memory allocation failed on Windows[/+]ssszzc commentedon Jul 29, 2026
Thanks so much, your advice helped me solve the problem! 👍
0xShug0 commentedon Jul 29, 2026
@ssszzc Great! I'm glad I left this option available, so I don't need to re-release the prebuilts. The issue is each weight store reserved 4 GB for tensor metadata even though it needed only a small amount. Windows charged those allocations against the system commit limit, while Linux usually hid the issue through memory overcommit. The fix has been pushed and will be included in the next prebuilt release. After that, you won’t need to pass this option.
log: reserved vs used bytes per ggml context, and where each weight b…
core: opt-in sizing of no_alloc contexts from what the runtime knows
core: opt-in sizing of no_alloc contexts from what the runtime knows
log: reserved vs used bytes per ggml context, and where each weight b…
log: reserved vs used bytes per ggml context, and where each weight b…
metrics: process peak memory in --metrics, reserved-vs-used per ggml …