mirror of
https://github.com/mudler/LocalAI.git
synced 2026-06-22 15:49:12 -04:00
fix(diffusers): pin diffusers and transformers to a known-good pair The diffusers backend tracked git+https://github.com/huggingface/diffusers (main) with an unpinned transformers. transformers v5 restructured CLIPTextModel and removed the .text_model attribute that diffusers' single -file loader reads, so loading any single-file Stable Diffusion checkpoint fails: create_diffusers_clip_model_from_ldm (single_file_utils.py) position_embedding_dim = model.text_model.embeddings.position_embedding... AttributeError: 'CLIPTextModel' object has no attribute 'text_model' No released diffusers (<=0.38.0) supports transformers v5 - only unreleased diffusers main does. Because the requirements tracked main plus an unpinned transformers, every backend image froze whichever pair existed at build time, and images built once transformers v5 shipped but before diffusers main caught up are permanently broken. Pin the last known-good released pair across all requirements files: diffusers==0.38.0 and transformers==4.57.6. 0.38.0 still exposes every pipeline backend.py imports (Flux, Wan, Sana, LTX2, Qwen, GGUF), so no functionality is lost, and builds become reproducible instead of drifting into the broken window. Fixes #9979 Assisted-by: Claude:claude-opus-4-8 [Claude Code] Signed-off-by: Adira Denis Muhando <dennisadira@gmail.com>
25 lines
1.0 KiB
Plaintext
25 lines
1.0 KiB
Plaintext
--extra-index-url https://download.pytorch.org/whl/cu130
|
|
diffusers==0.38.0
|
|
opencv-python
|
|
transformers==4.57.6
|
|
torchvision
|
|
accelerate
|
|
git+https://github.com/xhinker/sd_embed
|
|
peft
|
|
sentencepiece
|
|
torch
|
|
ftfy
|
|
optimum-quanto
|
|
# diffusers and transformers are pinned together on purpose. transformers v5
|
|
# restructured CLIPTextModel and dropped the `.text_model` attribute, which
|
|
# breaks single-file Stable Diffusion loading on every released diffusers
|
|
# (<=0.38.0); only unreleased diffusers main supports transformers v5. Tracking
|
|
# main via git froze whichever broken pair existed at image-build time. Pin the
|
|
# last known-good released pair so builds are reproducible and can't drift into
|
|
# the broken window. See https://github.com/mudler/LocalAI/issues/9979
|
|
#
|
|
# compel is intentionally omitted: it pins transformers~=4.25, which conflicts
|
|
# with this pin and previously forced pip into multi-hour resolver backtracking
|
|
# storms in CI. backend.py imports it lazily and gates the COMPEL=1 env var on
|
|
# the import succeeding, so dropping it here is safe.
|