-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Description
Tried to load model locally using this:
def load_vocos(path, device):
config_path = os.path.join(path, 'config.yaml')
model_path = os.path.join(path, 'pytorch_model.bin')
model = Vocos.from_hparams(config_path)
state_dict = torch.load(model_path, map_location="cpu")
if isinstance(model.feature_extractor, EncodecFeatures):
encodec_parameters = {
"feature_extractor.encodec." + key: value
for key, value in model.feature_extractor.encodec.state_dict().items()
}
state_dict.update(encodec_parameters)
model.load_state_dict(state_dict)
model.eval()
model.to(device)
return modelHowever, this line is hard-coded to load pretrained encodec, preventing offline usage:
vocos/vocos/feature_extractors.py
Line 68 in c859e3b
| self.encodec = encodec(pretrained=True) |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels