Skip to content

Commit bec84ab

Browse files
authored
Fix vocos config loading (#53)
* fix vocos loading * format
1 parent 3f740ab commit bec84ab

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

mlx_audio/codec/models/vocos/vocos.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,9 @@ def from_pretrained(cls, path_or_repo: str) -> Vocos:
289289
weights = mx.load(f)
290290

291291
config_path = path / "config.yaml"
292-
model = cls.from_hparams(config_path)
292+
with open(config_path, "r") as f:
293+
config = yaml.safe_load(f)
294+
model = cls.from_hparams(config)
293295

294296
# remove unused weights
295297
try:

mlx_audio/tts/generate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def parse_args():
231231
def main():
232232
args = parse_args()
233233
generate_audio(model_path=args.model, **vars(args))
234-
235-
234+
235+
236236
if __name__ == "__main__":
237237
main()

0 commit comments

Comments
 (0)