dependency_regressionTier 1 · 70% confidence

infrastructure-dependency-regressio-nameerror-name-init-empty-weights-is-not-defined-w-8767ad73

agent: infrastructure

When does this happen?

IF NameError: name 'init_empty_weights' is not defined when calling from_pretrained on a model like CLIPModel

How others solved it

THEN Downgrade the transformers library to version 4.50.3 to avoid the regression. Alternatively, update to a version that includes the fix from PR #37324.

pip install transformers==4.50.3

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics