---
title: "torchvision Breaking Changes on PyPI | Since.dev"
description: "What each torchvision release removed, renamed or changed: 41 breaking changes in 2 versions on PyPI, each with its source."
canonical_url: https://since.dev/packages/pypi/torchvision
last_updated: 2026-09-02
---

# torchvision breaking changes

Every breaking API change we have recorded in torchvision on PyPI: 41 breaking changes in 2 versions. Below are its newest 2 versions, removals and renames first, each with its source.

Newest change September 2, 2026

## 0.29.0

8 breaking changes, first published September 2, 2026.

- **Removed** `decode_image.apply_exif_orientation`  

EXIF orientation is now always applied. Remove the apply_exif_orientation argument from calls. [meta-pytorch.org](https://meta-pytorch.org/torchcodec/0.16/generated%5Fexamples/migration/torchvision%5Fmigration.html)
- **Removed** `encode_jpeg`  

Instantiate JpegEncoder with the image and call to_tensor with quality instead. [meta-pytorch.org](https://meta-pytorch.org/torchcodec/0.16/generated%5Fexamples/migration/torchvision%5Fmigration.html)
- **Removed** `encode_png`  

Instantiate PngEncoder with the image and call to_tensor with compression_level instead. [meta-pytorch.org](https://meta-pytorch.org/torchcodec/0.16/generated%5Fexamples/migration/torchvision%5Fmigration.html)
- **Removed** `torchvision.io.read_file`  

No equivalent is needed. Pass the file path directly to the decoder instead. [meta-pytorch.org](https://meta-pytorch.org/torchcodec/0.16/generated%5Fexamples/migration/torchvision%5Fmigration.html)
- **Default changed** `decode_image`  

Calls that relied on the source's own channel layout must pass mode="UNCHANGED" explicitly. [meta-pytorch.org](https://meta-pytorch.org/torchcodec/0.16/generated%5Fexamples/migration/torchvision%5Fmigration.html)
- **Signature changed** `torchvision.io.write_file`  

Use the to_file method of an encoder class instead. [pypi.org](https://pypi.org/project/torchvision/0.29.0/)
- **Signature changed** `torchvision.io.write_jpeg`  

Instantiate JpegEncoder with the image and call to_file with quality instead. [pypi.org](https://pypi.org/project/torchvision/0.29.0/)
- **Signature changed** `torchvision.io.write_png`  

Instantiate PngEncoder with the image and call to_file with compression_level instead. [pypi.org](https://pypi.org/project/torchvision/0.29.0/)

## 0.28.0

33 breaking changes, first published July 8, 2026.

- **Behavior changed** `F.resize`  

Mask inputs passed to F.resize with NEAREST_EXACT now get NEAREST_EXACT output rather than plain NEAREST output. Code that relied on the old mask output may see different results. [github.com](https://github.com/pytorch/vision/releases/tag/v0.28.0)
- **Signature changed** `torchvision.transforms.v2.AugMix.__init__`  

Was def \_\_init\_\_(self, severity: int = 3, mixture_width: int = 3, chain_depth: int = -1, alpha: float = 1.0, all_ops: bool = True, interpolation: Union\[InterpolationMode, int\] = InterpolationMode.BILINEAR, fill: Union\[\_FillType... [pypi.org](https://pypi.org/project/torchvision/0.28.0/)
- **Signature changed** `torchvision.transforms.v2.AutoAugment.__init__`  

Was def \_\_init\_\_(self, policy: AutoAugmentPolicy = AutoAugmentPolicy.IMAGENET, interpolation: Union\[InterpolationMode, int\] = InterpolationMode.NEAREST, fill: Union\[\_FillType, dict\[Union\[type, str\], \_FillType\]\] = None) -> None; now def... [pypi.org](https://pypi.org/project/torchvision/0.28.0/)
- **Signature changed** `torchvision.transforms.v2.ElasticTransform.__init__`  

Was def \_\_init\_\_(self, alpha: Union\[float, Sequence\[float\]\] = 50.0, sigma: Union\[float, Sequence\[float\]\] = 5.0, interpolation: Union\[InterpolationMode, int\] = InterpolationMode.BILINEAR, fill: Union\[\_FillType, dict\[Union\[type, str\]... [pypi.org](https://pypi.org/project/torchvision/0.28.0/)
- **Signature changed** `torchvision.transforms.v2.functional.affine`  

Was def affine(inpt: torch.Tensor, angle: Union\[int, float\], translate: list\[float\], scale: float, shear: list\[float\], interpolation: Union\[InterpolationMode, int\] = InterpolationMode.NEAREST, fill: \_FillTypeJIT = None, center... [pypi.org](https://pypi.org/project/torchvision/0.28.0/)
- **Signature changed** `torchvision.transforms.v2.functional.affine_image`  

Was def affine_image(image: torch.Tensor, angle: Union\[int, float\], translate: list\[float\], scale: float, shear: list\[float\], interpolation: Union\[InterpolationMode, int\] = InterpolationMode.NEAREST, fill: \_FillTypeJIT = None, center... [pypi.org](https://pypi.org/project/torchvision/0.28.0/)
- **Signature changed** `torchvision.transforms.v2.functional.affine_video`  

Was def affine_video(video: torch.Tensor, angle: Union\[int, float\], translate: list\[float\], scale: float, shear: list\[float\], interpolation: Union\[InterpolationMode, int\] = InterpolationMode.NEAREST, fill: \_FillTypeJIT = None, center... [pypi.org](https://pypi.org/project/torchvision/0.28.0/)
- **Signature changed** `torchvision.transforms.v2.functional.elastic`  

Was def elastic(inpt: torch.Tensor, displacement: torch.Tensor, interpolation: Union\[InterpolationMode, int\] = InterpolationMode.BILINEAR, fill: \_FillTypeJIT = None) -> torch.Tensor; now def elastic(inpt: torch.Tensor, displacement... [pypi.org](https://pypi.org/project/torchvision/0.28.0/)
- **Signature changed** `torchvision.transforms.v2.functional.elastic_image`  

Was def elastic_image(image: torch.Tensor, displacement: torch.Tensor, interpolation: Union\[InterpolationMode, int\] = InterpolationMode.BILINEAR, fill: \_FillTypeJIT = None) -> torch.Tensor; now def elastic_image(image: torch.Tensor... [pypi.org](https://pypi.org/project/torchvision/0.28.0/)
- **Signature changed** `torchvision.transforms.v2.functional.elastic_video`  

Was def elastic_video(video: torch.Tensor, displacement: torch.Tensor, interpolation: Union\[InterpolationMode, int\] = InterpolationMode.BILINEAR, fill: \_FillTypeJIT = None) -> torch.Tensor; now def elastic_video(video: torch.Tensor... [pypi.org](https://pypi.org/project/torchvision/0.28.0/)

And 23 more in this version.

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version, not only the newest. On Team and up, a fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous management.

Scan a public repository now, or give your agent one line.

### See how out of date your code is.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
