Download Latest Version TorchVision 0.29.1 Release source code.zip (14.8 MB) Google Add to Preferred Sources
Home / v0.28.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-06-22 2.9 kB
TorchVision 0.28.0 Release source code.tar.gz 2026-06-22 14.4 MB
TorchVision 0.28.0 Release source code.zip 2026-06-22 14.8 MB
Totals: 3 Items   29.3 MB 0

TorchVision 0.28 is out! This is a small release whose main change is the removal of the deprecated video decoding and encoding APIs (read_video, write_video, read_video_timestamps, VideoReader) from torchvision.io. Video decoding and encoding has fully migrated to TorchCodec as a part of our efforts to re-focus TorchVision. On the transforms side, v2.Resize now accepts string interpolation modes (e.g. "bilinear") and correctly honors NEAREST_EXACT on masks.

Backwards Incompatible Changes

  • Video decoding/encoding removed from torchvision.io; migrated to TorchCodec (#9451)

read_video, write_video, read_video_timestamps, and VideoReader are no longer available in OSS torchvision, and the video-backed datasets now require TorchCodec. These APIs were deprecated (with warnings) in prior releases and are now gone.

Symptoms you may hit:

  • ImportError: cannot import name 'read_video' from 'torchvision.io'
  • import torchvision.io.video raising ModuleNotFoundError/ImportError
  • From video datasets: ImportError: Video decoding capabilities were removed from torchvision and migrated to TorchCodec. Please install TorchCodec following instructions at https://github.com/pytorch/torchcodec#installing-torchcodec

As an example, if you performed the following on TorchVision 0.27: python from torchvision.io import read_video frames, audio, info = read_video("video.mp4")

You would now achieve that with: python # pip install torchcodec from torchcodec.decoders import VideoDecoder decoder = VideoDecoder("video.mp4") frames = decoder[:] # or decoder.get_frames_in_range(...), etc. See the TorchCodec documentation for tutorials and API references.

Improvements

  • Allow passing interpolation as a string (e.g. "bilinear", "nearest") in resize transforms, in addition to the InterpolationMode enum (#9461)
  • tv_tensors.wrap() now preserves metadata for custom TVTensor subclasses — a subclass can define its own .wrap() method to control how it is re-wrapped (#9490)

Bug fixes

  • Fix F.resize on tv_tensors.Mask to honor NEAREST_EXACT interpolation. Previously the interpolation argument was ignored for mask inputs (resize_mask hardcoded NEAREST), so NEAREST_EXACT silently produced plain NEAREST output (#9497)
  • Fix a GIF decoder bug on malformed GIFs that could write outside the allocated tensor's memory (#9520)
Source: README.md, updated 2026-06-22