Skip to content

PIL version check for enum change appears to break SIMD versions #6153

Closed
@rwightman

Description

@rwightman

🐛 Describe the bug

This change appears to break current Pillow-SIMD version #5898

    if tuple(int(part) for part in PIL.__version__.split(".")) >= (9, 1):
  File "/home/.../lib/python3.10/site-packages/torchvision/transforms/_pil_constants.py", line 7, in <genexpr>
    if tuple(int(part) for part in PIL.__version__.split(".")) >= (9, 1):
ValueError: invalid literal for int() with base 10: 'post1'

Amusingly enough, I warned against this approach in a users PR in timm huggingface/pytorch-image-models#1256

Would be nice to have it fixed before 1.12 is finalized, I just hit this trying out the RC

Versions

PT 1.12 RC, TV 0.13.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions