Skip to main content

pixano-inference-clip

CLIP-style image and text embedding models for Pixano Inference, distributed as a standalone plugin package. It serves the embedding capability: turn an image or text into a vector in a shared space, so image and text embeddings are directly comparable (for semantic search, text-to-image search, dedup, clustering).

Backed by open_clip, so one plugin loads the whole CLIP family by checkpoint spec. The default is MobileCLIP2 — recent (Apple 2025), performant, and CPU-friendly (no big GPU needed).

Install

pip install pixano-inference[clip]   # or: pip install pixano-inference-clip

From the repository (uv also installs the core from it):

uv pip install "pixano-inference-clip @ git+https://github.com/pixano/pixano-inference#subdirectory=packages/pixano-inference-clip"
# or, from a clone:  uv pip install ./packages/pixano-inference-clip

Use

Reference the model by name in a config (the default checkpoint is MobileCLIP2-S2 with the dfndr2b weights):

from pixano_inference.configs import DeploymentConfig, ModelConfig
from pixano_inference_clip import OpenClipParams

models = [
    ModelConfig(
        name="clip",
        model_class="OpenClipEmbeddingModel",
        model_params=OpenClipParams(),  # defaults to MobileCLIP2-S2 / dfndr2b
        deployment=DeploymentConfig(num_gpus=0, num_cpus=2),  # runs on CPU
    ),
]
from pixano_inference.client import SyncPixanoInferenceClient
from pixano_inference.schemas import EmbeddingRequest

client = SyncPixanoInferenceClient("http://localhost:7463")

text_vec = client.embedding(EmbeddingRequest(model="clip", text="a photo of a cat"))
image_vec = client.embedding(EmbeddingRequest(model="clip", image="data:image/png;base64,..."))

# Same space: cosine similarity between text_vec and image_vec is meaningful.
print(text_vec.data.dim, text_vec.data.embeddings.to_numpy().shape)  # (dim, [1, dim])

Both text and image accept a list for batch embedding (output is [N, dim]). Vectors are L2-normalized by default (normalize=False to disable).

Other checkpoints

Any open_clip spec works — e.g. another size like path="MobileCLIP2-S0" (pretrained="dfndr2b"), path="ViT-B-32" with pretrained="laion2b_s34b_b79k", or an hf-hub:<repo> reference to an open_clip-format repo (leave pretrained=None for those).

Development

The package is self-contained, with its own lock file:

cd packages/pixano-inference-clip
uv sync
uv run pytest                    # unit tests
uv run pytest -m integration     # deploys MobileCLIP2 on a local Ray Serve runtime

Metadata

Release files for pixano-inference-clip 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pixano-inference-clip 0.1.0
File Size Uploaded
pixano_inference_clip-0.1.0.tar.gz 178.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pixano-inference-clip 0.1.0
File Interpreter ABI Platform
pixano_inference_clip-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 199.7 kB

Release files / pixano_inference_clip-0.1.0.tar.gz

Download URL pixano_inference_clip-0.1.0.tar.gz
Size 178.8 kB
Tags Source
SHA-256 checksum
How to use checksums
29e842d2f2f96f1fab4557728d63c0cd8735a076837a6688760e1bb352a6bffe
BLAKE2b-256 checksum
How to use checksums
c48bc5b55ae791d81f20149a9940547f48f34c3570c7fbe271a6588b558fd69a
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 Sep 23, 2026.

Transparency log

Release files / pixano_inference_clip-0.1.0-py3-none-any.whl

Download URL pixano_inference_clip-0.1.0-py3-none-any.whl
Size 20.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
215828079973de42fd6853eaca36d907f3e051709f46f204b92771b1950eaf11
BLAKE2b-256 checksum
How to use checksums
a1525d5adc6b3c131d548c1e1c96a806e0ad7b436e9573e5f9d0be6273b40967
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 Sep 23, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

2 release files

0.2.0

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page