Skip to content

fix(diffusers): drop compel from requirements to unblock pip resolver#9632

Merged
mudler merged 1 commit into
masterfrom
fix/diffusers-drop-compel
May 1, 2026
Merged

fix(diffusers): drop compel from requirements to unblock pip resolver#9632
mudler merged 1 commit into
masterfrom
fix/diffusers-drop-compel

Conversation

@mudler
Copy link
Copy Markdown
Owner

@mudler mudler commented May 1, 2026

compel 2.3.1 (latest, Nov 2025) declares transformers~=4.25 in its metadata, i.e. >=4.25,<5.0. After transformers 5.0 (2026-01-26) and huggingface-hub 1.0 (2025-10-27) shipped, the weekly DEPS_REFRESH cache rotation in CI started seeing the new majors and pip's resolver went into multi-hour backtracking storms walking every transformers 4.x candidate against every accelerate/hf-hub/tokenizers combination to find a set compel would accept. The 2026-04-29 backend-build for the diffusers backend (darwin-mps + l4t + cublas13-turboquant matrix cells) hit the GitHub Actions 6h job timeout still inside pip install — the build itself never started.

compel is the only hard upper bound on transformers in this stack (diffusers, accelerate, peft, optimum-quanto are all flexible), and upstream support for transformers 5 is still in flight: damian0815/ compel#129 ("Modernize Compel for Transformers 5") and #128 ("Bump transformers version to >5.0") are both open as of today.

backend.py only constructs Compel() when COMPEL=1 is set in the env (default off), so make compel a true optional extra:

  • Wrap the top-level from compel import ... in try/except ImportError, mirroring the existing sd_embed pattern.
  • Auto-disable COMPEL with a warning when the module isn't installed, instead of crashing on module load.
  • Drop compel from all eight requirements-*.txt variants so the resolver no longer has to satisfy its transformers cap.
  • Leave a TODO in backend.py and in each requirements file pointing at the upstream PR/issue, so the dependency can be reinstated once compel supports transformers >= 5.

Users who rely on weighted-prompt embeddings can opt in with a manual pip install compel alongside COMPEL=1; the warning emitted on startup tells them how.

Related upstream issues/PR:

Assisted-by: Claude:claude-opus-4-7 [Bash Read Edit WebFetch]

compel 2.3.1 (latest, Nov 2025) declares transformers~=4.25 in its
metadata, i.e. >=4.25,<5.0. After transformers 5.0 (2026-01-26) and
huggingface-hub 1.0 (2025-10-27) shipped, the weekly DEPS_REFRESH
cache rotation in CI started seeing the new majors and pip's resolver
went into multi-hour backtracking storms walking every transformers
4.x candidate against every accelerate/hf-hub/tokenizers combination
to find a set compel would accept. The 2026-04-29 backend-build for
the diffusers backend (darwin-mps + l4t + cublas13-turboquant matrix
cells) hit the GitHub Actions 6h job timeout still inside pip
install — the build itself never started.

compel is the only hard upper bound on transformers in this stack
(diffusers, accelerate, peft, optimum-quanto are all flexible), and
upstream support for transformers 5 is still in flight: damian0815/
compel#129 ("Modernize Compel for Transformers 5") and #128 ("Bump
transformers version to >5.0") are both open as of today.

backend.py only constructs Compel() when COMPEL=1 is set in the env
(default off), so make compel a true optional extra:

  - Wrap the top-level `from compel import ...` in try/except
    ImportError, mirroring the existing sd_embed pattern.
  - Auto-disable COMPEL with a warning when the module isn't
    installed, instead of crashing on module load.
  - Drop compel from all eight requirements-*.txt variants so the
    resolver no longer has to satisfy its transformers cap.
  - Leave a TODO in backend.py and in each requirements file
    pointing at the upstream PR/issue, so the dependency can be
    reinstated once compel supports transformers >= 5.

Users who rely on weighted-prompt embeddings can opt in with a
manual `pip install compel` alongside COMPEL=1; the warning emitted
on startup tells them how.

Assisted-by: Claude:claude-opus-4-7 [Bash Read Edit WebFetch]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
@mudler mudler merged commit 7325046 into master May 1, 2026
42 of 52 checks passed
@mudler mudler deleted the fix/diffusers-drop-compel branch May 1, 2026 12:45
@mudler mudler added the bug Something isn't working label May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant