Skip to content

Handle the PIL.Image.Resampling deprecation #588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 21, 2022
Merged

Conversation

anton-l
Copy link
Member

@anton-l anton-l commented Sep 20, 2022

Context: PIL deprecates PIL.Image.BILINEAR etc. in favor of PIL.Image.Resampling.BILINEAR in 10.0 (currently 9.2):
https://github.com/python-pillow/Pillow/blob/488589b4b69ab7729a059b3f1512398d717d2eda/docs/deprecations.rst#constants

As Pillow 10.0 is not yet officially released, and transformers still use PIL.Image.BILINEAR for our CLIP dependency (https://github.com/huggingface/transformers/blob/cdaed367b005d2a88a70a1e3c2cc5ec151e68fed/src/transformers/models/clip/feature_extraction_clip.py#L67), I'm capping the PIL version at 10.0 until its release.

Fixes #586

@anton-l anton-l mentioned this pull request Sep 20, 2022
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 20, 2022

The documentation is not available anymore as the PR was closed or merged.

@patrickvonplaten
Copy link
Contributor

Nice! Also heads-up to @sgugger @NielsRogge regarding CLIP in Transformers

@anton-l anton-l merged commit dd350c8 into main Sep 21, 2022
@kashif kashif deleted the pil-resampling-fix branch September 22, 2022 15:05
PhaneeshB pushed a commit to nod-ai/diffusers that referenced this pull request Mar 1, 2023
…ggingface#588)


* Disable SHARK-Runtime flags if USE_IREE=1 specified during setup.

* Update setup_venv.sh

* Autodetect cpu count for runtime flags.
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
* Handle the PIL.Image.Resampling deprecation

* style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Pillow library
3 participants