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.2.1

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.2.1
File Size Uploaded
pixano_inference_clip-0.2.1.tar.gz 179.8 kB Details

Built distribution (wheel)

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

Total release size: 201.0 kB

Release files / pixano_inference_clip-0.2.1.tar.gz

Download URL pixano_inference_clip-0.2.1.tar.gz
Size 179.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5ed97c253a55734a99c2f8e8fce962f84ada8be28f2f495c0ec6e1cb64eb938e
BLAKE2b-256 checksum
How to use checksums
d0a58dd842312b6e241d6999c44fd56120d5160833d6035ec88b8af1f94d5b0e
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

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

Download URL pixano_inference_clip-0.2.1-py3-none-any.whl
Size 21.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d76bccbafb3ab884c6fb2606d8d14107b06111fdfb40a422314b7f3858b7b60
BLAKE2b-256 checksum
How to use checksums
09ab2ea66c154db7b4b13fbdabdb9d720269e8eb04b8a16b377b7a9ae9bec9a5
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

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

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