Recent Torchcodec update killed the F5 on Colab

#34
by hlatif85 - opened

Torchcodec released v0.10 almost 2 hours ago https://github.com/meta-pytorch/torchcodec/releases/tag/v0.10.0

Before this F5 was working fine on colab


config.json: 1.26kB [00:00, 3.22MB/s]
torch_dtype is deprecated! Use dtype instead!
model.safetensors: 100% 1.62G/1.62G [00:19<00:00, 81.8MB/s]
generation_config.json: 3.77kB [00:00, 15.3MB/s]
tokenizer_config.json: 283kB [00:00, 328MB/s]
vocab.json: 1.04MB [00:00, 36.5MB/s]
tokenizer.json: 2.71MB [00:00, 127MB/s]
merges.txt: 494kB [00:00, 62.4MB/s]
normalizer.json: 52.7kB [00:00, 103MB/s]
added_tokens.json: 34.6kB [00:00, 73.6MB/s]
special_tokens_map.json: 2.19kB [00:00, 10.4MB/s]
preprocessor_config.json: 100% 340/340 [00:00<00:00, 3.50MB/s]
Device set to use cuda
Using chunk_length_s is very experimental with seq2seq models. The results will not necessarily be entirely accurate and will have caveats. More information: huggingface/transformers#20104. Ignore this warning with pipeline(..., ignore_warning=True). To use Whisper for long-form transcription, use rather the model's generate method directly as the model relies on it's own chunking mechanism (cf. Whisper original paper, section 3.8. Long-form Transcription).
Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/gradio/queueing.py", line 766, in process_events
response = await route_utils.call_process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/gradio/route_utils.py", line 355, in call_process_api
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/gradio/blocks.py", line 2152, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/gradio/blocks.py", line 1629, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/anyio/to_thread.py", line 63, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/anyio/_backends/_asyncio.py", line 2502, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/anyio/_backends/_asyncio.py", line 986, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/gradio/utils.py", line 1034, in wrapper
response = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/f5_tts/infer/infer_gradio.py", line 301, in basic_tts
audio_out, spectrogram_path, ref_text_out, used_seed = infer(
^^^^^^
File "/usr/local/lib/python3.12/dist-packages/f5_tts/infer/infer_gradio.py", line 160, in infer
ref_audio, ref_text = preprocess_ref_audio_text(ref_audio_orig, ref_text, show_info=show_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/f5_tts/infer/utils_infer.py", line 361, in preprocess_ref_audio_text
ref_text = transcribe(ref_audio)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/f5_tts/infer/utils_infer.py", line 176, in transcribe
return asr_pipe(
^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/transformers/pipelines/automatic_speech_recognition.py", line 275, in call
return super().call(inputs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/transformers/pipelines/base.py", line 1459, in call
return next(
^^^^^
File "/usr/local/lib/python3.12/dist-packages/transformers/pipelines/pt_utils.py", line 126, in next
item = next(self.iterator)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/transformers/pipelines/pt_utils.py", line 271, in next
processed = self.infer(next(self.iterator), **self.params)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/torch/utils/data/dataloader.py", line 732, in next
data = self._next_data()
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/torch/utils/data/dataloader.py", line 788, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/torch/utils/data/_utils/fetch.py", line 33, in fetch
data.append(next(self.dataset_iter))
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/transformers/pipelines/pt_utils.py", line 188, in next
processed = next(self.subiterator)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/transformers/pipelines/automatic_speech_recognition.py", line 381, in preprocess
import torchcodec
File "/usr/local/lib/python3.12/dist-packages/torchcodec/init.py", line 12, in
from . import decoders, encoders, samplers, transforms # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/torchcodec/decoders/init.py", line 7, in
from .._core import AudioStreamMetadata, VideoStreamMetadata
File "/usr/local/lib/python3.12/dist-packages/torchcodec/_core/init.py", line 8, in
from ._metadata import (
File "/usr/local/lib/python3.12/dist-packages/torchcodec/_core/_metadata.py", line 16, in
from torchcodec._core.ops import (
File "/usr/local/lib/python3.12/dist-packages/torchcodec/_core/ops.py", line 109, in
ffmpeg_major_version, core_library_path = load_torchcodec_shared_libraries()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/torchcodec/_core/ops.py", line 76, in load_torchcodec_shared_libraries
raise RuntimeError(
RuntimeError: Could not load libtorchcodec. Likely causes:

  1. FFmpeg is not properly installed in your environment. We support
    versions 4, 5, 6, 7, and 8, and we attempt to load libtorchcodec
    for each of those versions. Errors for versions not installed on
    your system are expected; only the error for your installed FFmpeg
    version is relevant. On Windows, ensure you've installed the
    "full-shared" version which ships DLLs.

  2. The PyTorch version (2.9.0+cu126) is not compatible with
    this version of TorchCodec. Refer to the version compatibility
    table:
    https://github.com/pytorch/torchcodec?tab=readme-ov-file#installing-torchcodec.

  3. Another runtime dependency; see exceptions below.

    The following exceptions were raised as we tried to load libtorchcodec:

[start of libtorchcodec loading traceback]
FFmpeg version 8:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/torch/_ops.py", line 1488, in load_library
ctypes.CDLL(path)
File "/usr/lib/python3.12/ctypes/init.py", line 379, in init
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: libavutil.so.60: cannot open shared object file: No such file or directory

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/torchcodec/_core/ops.py", line 57, in load_torchcodec_shared_libraries
torch.ops.load_library(core_library_path)
File "/usr/local/lib/python3.12/dist-packages/torch/_ops.py", line 1490, in load_library
raise OSError(f"Could not load this library: {path}") from e
OSError: Could not load this library: /usr/local/lib/python3.12/dist-packages/torchcodec/libtorchcodec_core8.so

FFmpeg version 7:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/torch/_ops.py", line 1488, in load_library
ctypes.CDLL(path)
File "/usr/lib/python3.12/ctypes/init.py", line 379, in init
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: libavutil.so.59: cannot open shared object file: No such file or directory

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/torchcodec/_core/ops.py", line 57, in load_torchcodec_shared_libraries
torch.ops.load_library(core_library_path)
File "/usr/local/lib/python3.12/dist-packages/torch/_ops.py", line 1490, in load_library
raise OSError(f"Could not load this library: {path}") from e
OSError: Could not load this library: /usr/local/lib/python3.12/dist-packages/torchcodec/libtorchcodec_core7.so

FFmpeg version 6:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/torch/_ops.py", line 1488, in load_library
ctypes.CDLL(path)
File "/usr/lib/python3.12/ctypes/init.py", line 379, in init
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: libavutil.so.58: cannot open shared object file: No such file or directory

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/torchcodec/_core/ops.py", line 57, in load_torchcodec_shared_libraries
torch.ops.load_library(core_library_path)
File "/usr/local/lib/python3.12/dist-packages/torch/_ops.py", line 1490, in load_library
raise OSError(f"Could not load this library: {path}") from e
OSError: Could not load this library: /usr/local/lib/python3.12/dist-packages/torchcodec/libtorchcodec_core6.so

FFmpeg version 5:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/torch/_ops.py", line 1488, in load_library
ctypes.CDLL(path)
File "/usr/lib/python3.12/ctypes/init.py", line 379, in init
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: libavutil.so.57: cannot open shared object file: No such file or directory

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/torchcodec/_core/ops.py", line 57, in load_torchcodec_shared_libraries
torch.ops.load_library(core_library_path)
File "/usr/local/lib/python3.12/dist-packages/torch/_ops.py", line 1490, in load_library
raise OSError(f"Could not load this library: {path}") from e
OSError: Could not load this library: /usr/local/lib/python3.12/dist-packages/torchcodec/libtorchcodec_core5.so

FFmpeg version 4:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/torch/_ops.py", line 1488, in load_library
ctypes.CDLL(path)
File "/usr/lib/python3.12/ctypes/init.py", line 379, in init
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: /usr/local/lib/python3.12/dist-packages/torchcodec/libtorchcodec_core4.so: undefined symbol: _ZN3c1013MessageLogger6streamB5cxx11Ev

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/torchcodec/_core/ops.py", line 57, in load_torchcodec_shared_libraries
torch.ops.load_library(core_library_path)
File "/usr/local/lib/python3.12/dist-packages/torch/_ops.py", line 1490, in load_library
raise OSError(f"Could not load this library: {path}") from e
OSError: Could not load this library: /usr/local/lib/python3.12/dist-packages/torchcodec/libtorchcodec_core4.so
[end of libtorchcodec loading traceback].

Sign up or log in to comment