Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.
This repository was archived by the owner on Mar 20, 2026. It is now read-only.

Error: can't load model #3256

Description

@janson91

hi, I tried some wav2vec models, but there was always error:
the code is
`import torch
import fairseq

cp_path = '/path/to/wav2vec.pt'
model, cfg, task = fairseq.checkpoint_utils.load_model_ensemble_and_task([cp_path])
model = model[0]
model.eval()`

and the error :
the model: https://dl.fbaipublicfiles.com/fairseq/wav2vec/wav2vec_large.pt Error:KeyError: 'speech_pretraining'
the model:https://dl.fbaipublicfiles.com/fairseq/wav2vec/vq-wav2vec.pt Error:KeyError: 'binary_cross_entropy'
the model:https://dl.fbaipublicfiles.com/fairseq/wav2vec/vq-wav2vec_kmeans.pt KeyError: 'binary_cross_entropy'
the model:https://dl.fbaipublicfiles.com/fairseq/wav2vec/xlsr_53_56k.pt AttributeError: 'NoneType' object has no attribute 'task'

is anywhere more examples for loading the model?

thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions