Skip to content
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

Use Rust implementation for image resizing #2387

Merged
merged 2 commits into from Dec 6, 2023

Conversation

RunDevelopment
Copy link
Member

@RunDevelopment RunDevelopment commented Dec 6, 2023

This PR uses the new Rust implementation for resizing and removes the PIL-based resize method. Since the Rust version support full float32, I was also able to remove some limited_to_8bpc=True, which is nice.

The new resize method I made around the Rust version also has a few new features:

  • An option for gamma correction.
  • An option to separate alpha.
  • An OOM safeguard before resizing.

There are no user-facing changes in this PR. I commented out the new interpolation methods for now. They will be enabled in a follow-up PR.


Relates to #1035.

Copy link
Member

@joeyballentine joeyballentine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome

@joeyballentine joeyballentine merged commit 56bccc2 into chaiNNer-org:main Dec 6, 2023
14 checks passed
@RunDevelopment RunDevelopment deleted the resize-rust branch December 6, 2023 22:08
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.

None yet

2 participants