From 7333585a51f177946831b6c246767f0d88d5b99e Mon Sep 17 00:00:00 2001 From: MushiSenpai <259025340+MushiSenpai@users.noreply.github.com> Date: Sun, 28 Jun 2026 22:02:33 +0800 Subject: [PATCH] feat: wire fast-plaid as the `plaid` optional dependency (#335) Per the maintainer note in #335 (the compatibility issues that previously blocked integration are now fixed), expose fast-plaid through a `plaid` optional-dependency group instead of the manual `--no-deps` install in the README. - pyproject.toml: add `plaid = ["fast-plaid>=1.4.7,<2.0.0", "fastkmeans"]` and include it in the `all` group. - README: replace the experimental `--no-deps fast-plaid fastkmeans` snippet with `pip install "colpali-engine[plaid]"` and drop the "experimentally" caveat. fast-plaid 1.4.7.x requires torch==2.11.0, which sits inside the project's existing torch>=2.2.0,<2.12.0 pin. Co-Authored-By: Claude Opus 4.8 --- README.md | 4 ++-- pyproject.toml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fd6a4e13..c3675414 100644 --- a/README.md +++ b/README.md @@ -119,10 +119,10 @@ with torch.no_grad(): scores = processor.score_multi_vector(query_embeddings, image_embeddings) ``` -We now support `fast-plaid` experimentally to make matching quicker for larger corpus sizes: +We support `fast-plaid` to make matching quicker for larger corpus sizes. Install it with the `plaid` extra: ```python -# !pip install --no-deps fast-plaid fastkmeans +# !pip install "colpali-engine[plaid]" # Process the inputs by batches of 4 dataloader = DataLoader( diff --git a/pyproject.toml b/pyproject.toml index d9e3e695..7651fbaa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,12 +62,15 @@ interpretability = [ lik = ["late-interaction-kernels>=0.4.1,<0.5.0"] +plaid = ["fast-plaid>=1.4.7,<2.0.0", "fastkmeans"] + dev = ["pytest>=8.0.0", "ruff>=0.4.0"] all = [ "colpali-engine[dev]", "colpali-engine[interpretability]", "colpali-engine[lik]", + "colpali-engine[plaid]", "colpali-engine[train]", ]