PyTorch is consolidating image, video, and audio decoding and encoding in TorchCodec, while focusing TorchVision and TorchAudio more narrowly on transformations. The change is intended to simplify media processing and concentrate development and maintenance work.
TorchCodec converts media files or encoded data into tensors and can encode tensors back into media files. PyTorch says it supports images, video, and audio on CPU and CUDA. Some earlier input and output APIs in TorchVision and TorchAudio have been deprecated or removed.
TorchVision remains responsible for transforming image and video tensors, while TorchAudio handles audio transformations. PyTorch gives examples including video transforms with TorchVision and audio transforms such as Mel spectrograms with TorchAudio. Models, datasets, and pipelines are no longer the main focus of active development in these libraries; the post points to alternatives in the wider ecosystem, including Hugging Face libraries.
All three libraries are now ABI-stable, according to PyTorch, so they do not need to be rebuilt for every PyTorch release. Developers still using older media input or output APIs can consult the migration guide linked in the original post, which also explains the new division of responsibilities and previews further coverage of library updates and performance. Source: PyTorch Blog
🇬🇧 https://pytorch.org/blog/evolution-of-the-pytorch-media-processing-landscape