John Ho Claude Opus 4.8 (1M context) commited on
Commit
2f54bad
Β·
1 Parent(s): 8d31456

Pin transformers below 5.0 to fix moondream2 load crash

Browse files

transformers 5.0 added mark_tied_weights_as_initialized() which reads
model.all_tied_weights_keys, an attribute moondream's custom HfMoondream
remote code does not define. This crashed moondream2 loading on Space
rebuilds that resolved transformers>=4.56.0 to 5.1.0. Capping below 5.0
keeps both models on the known-good loading path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. requirements.txt +1 -1
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- transformers>=4.56.0
2
  pydantic
3
  pyvips-binary==8.16.0
4
  pyvips==2.2.3
 
1
+ transformers>=4.56.0,<5
2
  pydantic
3
  pyvips-binary==8.16.0
4
  pyvips==2.2.3