System Info / 系统信息
- Host: Windows + Docker Desktop
- Container OS: Ubuntu 22.04.5 LTS
- GPU: NVIDIA GeForce RTX 5070 Ti, 16 GB
- NVIDIA driver: 591.86
- Image:
xprobe/xinference:v2.12.0
- Python: 3.12
- PyTorch:
2.11.0+cu130
- TorchAudio:
2.11.0+cu130
- TorchCodec:
0.10.0
- FFmpeg CLI:
6.1.2
- SoundFile:
0.14.0
The IndexTTS2 model reaches READY and inference itself completes. The failure happens only when saving the generated waveform.
Running Xinference with Docker? / 是否使用 Docker 运行 Xinference?
Version info / 版本信息
v2.12.0
The command used to start Xinference / 用以启动 Xinference 的命令
services:
xinference:
image: xprobe/xinference:v2.12.0
gpus: all
shm_size: "8gb"
ports:
- "127.0.0.1:9997:9997"
environment:
XINFERENCE_HOME: /data
XINFERENCE_ENABLE_VIRTUAL_ENV: "1"
command: ["xinference-local", "-H", "0.0.0.0"]
Reproduction / 复现过程
- Start the v2.12.0 Docker image.
- Launch
IndexTTS2 and wait until the replica is READY.
- Open its launch UI, provide a valid WAV speaker prompt and text such as
你好测试一下.
- Generate speech, or call
POST /v1/audio/speech.
- IndexTTS2 runs inference, reaches the final "saving audio..." stage, then the endpoint returns HTTP 500.
Relevant call path:
xinference/model/audio/indextts2.py::speech
-> thirdparty/indextts/infer_v2.py::infer
-> torchaudio.save(output_path, wav.type(torch.int16), sampling_rate)
-> torchaudio.save_with_torchcodec
-> import torchcodec.encoders.AudioEncoder
-> Could not load libtorchcodec
The main error is:
RuntimeError: Could not load libtorchcodec
FFmpeg version 6:
OSError: libavutil.so.58: cannot open shared object file: No such file or directory
FFmpeg version 4:
OSError: libtorchcodec_core4.so: undefined symbol:
_ZN3c1013MessageLoggerC1EPKciib
ldd /usr/local/lib/python3.12/dist-packages/torchcodec/libtorchcodec_core6.so reports:
libtorch.so => not found
libc10.so => not found
libavutil.so.58 => not found
libavcodec.so.60 => not found
libavformat.so.60 => not found
libtorch_cpu.so => not found
The container's ffmpeg -version command works, but TorchCodec cannot resolve the corresponding shared libraries. There also appears to be a TorchCodec/PyTorch ABI mismatch for the fallback core library.
Full request ends with:
POST /v1/audio/speech HTTP/1.1" 500
Expected behavior / 期待表现
IndexTTS2 should return the generated WAV/audio response successfully after inference.
Analysis / 建议
The generated waveform already exists before the failure. This issue is specific to the output serialization path. A narrowly scoped fix would be to avoid TorchCodec for this IndexTTS2 WAV write and use soundfile.write (already installed in the image), or ensure the image ships a TorchCodec build and FFmpeg shared-library paths compatible with torch==2.11.0+cu130.
For example, replacing the final torchaudio.save call with an int16 SoundFile write avoids changing the inference path and avoids impacting other models that may depend on TorchCodec.
Related issues
System Info / 系统信息
xprobe/xinference:v2.12.02.11.0+cu1302.11.0+cu1300.10.06.1.20.14.0The IndexTTS2 model reaches
READYand inference itself completes. The failure happens only when saving the generated waveform.Running Xinference with Docker? / 是否使用 Docker 运行 Xinference?
Version info / 版本信息
v2.12.0The command used to start Xinference / 用以启动 Xinference 的命令
Reproduction / 复现过程
IndexTTS2and wait until the replica isREADY.你好测试一下.POST /v1/audio/speech.Relevant call path:
The main error is:
ldd /usr/local/lib/python3.12/dist-packages/torchcodec/libtorchcodec_core6.soreports:The container's
ffmpeg -versioncommand works, but TorchCodec cannot resolve the corresponding shared libraries. There also appears to be a TorchCodec/PyTorch ABI mismatch for the fallback core library.Full request ends with:
Expected behavior / 期待表现
IndexTTS2 should return the generated WAV/audio response successfully after inference.
Analysis / 建议
The generated waveform already exists before the failure. This issue is specific to the output serialization path. A narrowly scoped fix would be to avoid TorchCodec for this IndexTTS2 WAV write and use
soundfile.write(already installed in the image), or ensure the image ships a TorchCodec build and FFmpeg shared-library paths compatible withtorch==2.11.0+cu130.For example, replacing the final
torchaudio.savecall with an int16 SoundFile write avoids changing the inference path and avoids impacting other models that may depend on TorchCodec.Related issues
Could not load libtorchcodecproblem for embedding/reranker models on v2.9.0, but does not cover IndexTTS2 inference succeeding and failing specifically at WAV serialization on v2.12.0.No module named 'tn.english'dependency problem. That dependency was fixed locally before reproducing this output-save failure.