Spaces:
Runtime error
Startup failure traced: the modelscope pipeline imports ViTFeatureExtractor, removed in transformers 5 — transformers is unpinned
This Space is in RUNTIME_ERROR. The traceback ends inside the installed modelscope pipeline code at:
from transformers import ViTFeatureExtractor
ImportError: cannot import name 'ViTFeatureExtractor' from 'transformers'
Nothing in requirements.txt pins transformers (it arrives through the modelscope dependency, unpinned), so rebuilds resolve transformers 5.x. I checked the current release wheel (transformers 5.23.0): ViTFeatureExtractor is not exported and there is no feature_extraction_vit module — the feature-extractor classes were removed in the 5.x line (their role is covered by the image-processor classes, e.g. AutoImageProcessor).
Because the import sits in the installed modelscope package rather than in this repo's own code, the Space-level fix is the pin:
transformers<5
in requirements.txt (4.x still provides the name the pipeline imports). Patching site-packages at startup would also work but breaks on every rebuild. The same removal is waiting for any Space whose dependency stack imports a *FeatureExtractor name against an unpinned transformers.