From 269457fee33ca5fb3547ea2dd75197393c4b7a07 Mon Sep 17 00:00:00 2001 From: gudgud96 Date: Mon, 18 Mar 2024 23:36:04 +0800 Subject: [PATCH] [fix] call load_from_checkpoint as class method for newer lightning versions --- demo.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/demo.py b/demo.py index 69b0d52..b39ea03 100644 --- a/demo.py +++ b/demo.py @@ -115,13 +115,9 @@ def tts(lexicon, g2p, preprocess_config, model, is_onnx, args, verbose=False): model = ort_session is_onnx = True else: - model = EfficientSpeech(preprocess_config=preprocess_config, - infer_device=args.infer_device, - hifigan_checkpoint=args.hifigan_checkpoint,) - - model = model.load_from_checkpoint(checkpoint, - infer_device=args.infer_device, - map_location=torch.device('cpu')) + model = EfficientSpeech.load_from_checkpoint(checkpoint, + infer_device=args.infer_device, + map_location=torch.device('cpu')) model = model.to(args.infer_device)