From e76b2a53ff813af3a65465d8098f4007d16e2567 Mon Sep 17 00:00:00 2001 From: Laurent Date: Tue, 8 Jul 2025 15:59:42 +0200 Subject: [PATCH] More MLX VAD example. --- scripts/stt_from_file_mlx.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/stt_from_file_mlx.py b/scripts/stt_from_file_mlx.py index 1584bf0..ed82296 100644 --- a/scripts/stt_from_file_mlx.py +++ b/scripts/stt_from_file_mlx.py @@ -48,7 +48,10 @@ if __name__ == "__main__": nn.quantize(model, bits=8, group_size=64) print(f"loading model weights from {moshi_weights}") - model.load_weights(moshi_weights, strict=True) + if args.hf_repo.endswith("-candle"): + model.load_pytorch_weights(moshi_weights, lm_config, strict=True) + else: + model.load_weights(moshi_weights, strict=True) print(f"loading the text tokenizer from {text_tokenizer}") text_tokenizer = sentencepiece.SentencePieceProcessor(text_tokenizer) # type: ignore