hf-processors-rs (Python)
Hugging Face transformers image and audio preprocessors reproduced bit-exactly in Rust:
CLIP, ViT, SigLIP, ConvNeXt, BLIP, Qwen2-VL / Qwen2.5-VL / Qwen3-VL and Whisper. Both
transformers v5 backends are covered (backend="torchvision", the default, and backend="pil"),
and decoding plus preprocessing run in Rust with the GIL released, in parallel over the batch.
Status: alpha. See the project README for the exactness tables, tests and benchmarks.
pip install hf-processors-rs
import hf_processors_rs as hpr
proc = hpr.AutoImageProcessor.from_pretrained("openai/clip-vit-base-patch32")
pixel_values = proc(["cat.jpg", "dog.png"]) # numpy float32 (2, 3, 224, 224)
qwen = hpr.AutoImageProcessor.from_pretrained("Qwen/Qwen2-VL-2B-Instruct", backend="pil")
out = qwen("cat.jpg") # {"pixel_values", "image_grid_thw"}
fe = hpr.AutoFeatureExtractor.from_pretrained("openai/whisper-tiny")
feats = fe(audio, sampling_rate=16000)["input_features"] # (1, 80, 3000)
Inputs can be PIL images, uint8 numpy arrays, torch uint8 tensors, file paths or encoded
bytes. Paths and bytes are checked against a pixel limit before decoding, with Pillow's
Image.MAX_IMAGE_PIXELS semantics (hpr.set_max_image_pixels(n) / None;
DecompressionBombWarning above the limit, DecompressionBombError above twice the limit).
License
MIT OR Apache-2.0. The compiled extension statically links libjpeg-turbo (IJG and BSD-3-Clause
licenses) and permissively licensed Rust crates; all their license texts are included in the
distribution (.dist-info/licenses/). This software is based in part on the work of the
Independent JPEG Group.
Metadata
Release files for hf-processors-rs 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hf_processors_rs-0.1.0.tar.gz | 176.8 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| hf_processors_rs-0.1.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| hf_processors_rs-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ x86-64 | Details |
| hf_processors_rs-0.1.0-cp39-abi3-manylinux_2_28_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ ARM64 | Details |
| hf_processors_rs-0.1.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
| hf_processors_rs-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 10.5 MB
Release files / hf_processors_rs-0.1.0.tar.gz
| Download URL | hf_processors_rs-0.1.0.tar.gz |
|---|---|
| Size | 176.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd057fbffba25f8f4e175e4f9735b269d020001e19bae8e23579726fe717a19c
|
|
BLAKE2b-256 checksum How to use checksums |
aa8200022caea82b8754144059b719d54221bf91327192eaeac9202e428472f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency logRelease files / hf_processors_rs-0.1.0-cp39-abi3-win_amd64.whl
| Download URL | hf_processors_rs-0.1.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
aff6afb3647e6df8084340435e512672af54b17ca2dbb1c7470ee9fe0745a518
|
|
BLAKE2b-256 checksum How to use checksums |
94d88e5c7d924d281748946eadeca04f3868a5bcfe1ac339c1c6d2f864ec4345
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency logRelease files / hf_processors_rs-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl
| Download URL | hf_processors_rs-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.9 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
71db98ce9191b2d73000fadcaf2af79795d14c5afd601042359480872cdfe66b
|
|
BLAKE2b-256 checksum How to use checksums |
c6423192971a3ac3a2faaaf50be562a5a458159f4e0cba3295d4357c2ae3b26d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency logRelease files / hf_processors_rs-0.1.0-cp39-abi3-manylinux_2_28_aarch64.whl
| Download URL | hf_processors_rs-0.1.0-cp39-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.9 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
892e495f2a74b46f65f1f458a384637baaa3539eaf791dc7b6839865a0e27924
|
|
BLAKE2b-256 checksum How to use checksums |
9a23cfcdc8ce43d253f57d3d7916a94e91c81bde1456b14edcd079c5581febed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency logRelease files / hf_processors_rs-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | hf_processors_rs-0.1.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5001207fc93c52338088e2e40eaa5c2e461c7592eab5412cb4765c1c25e5e4dc
|
|
BLAKE2b-256 checksum How to use checksums |
c68757becd9e1e1e0b1ef6d6bfb155e4f8d4aa3ca9e3da37ea724b88b98cc681
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency logRelease files / hf_processors_rs-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | hf_processors_rs-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
972040a6071c5536d62cbfb1557b9f8d1867e370b4657e160270a7d86974633a
|
|
BLAKE2b-256 checksum How to use checksums |
400d91c9e29eb2243a64d9addb90c476059166da7260cebf79b15af7f89825fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency log