mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-10 10:32:17 +00:00
fix infer error
This commit is contained in:
parent
03d500a414
commit
f3fca0c81b
@ -281,9 +281,8 @@ def main():
|
|||||||
vocoder = vocoder.eval().to(device)
|
vocoder = vocoder.eval().to(device)
|
||||||
|
|
||||||
model = get_model(args).eval().to(device)
|
model = get_model(args).eval().to(device)
|
||||||
checkpoint = torch.load(args.model_path, map_location="cpu", weights_only=True)
|
checkpoint = torch.load(args.model_path, map_location="cpu")
|
||||||
|
if "ema_model_state_dict" in checkpoint or 'model_state_dict' in checkpoint:
|
||||||
if "model_state_dict" or "ema_model_state_dict" in checkpoint:
|
|
||||||
model = load_F5_TTS_pretrained_checkpoint(model, args.model_path)
|
model = load_F5_TTS_pretrained_checkpoint(model, args.model_path)
|
||||||
else:
|
else:
|
||||||
_ = load_checkpoint(
|
_ = load_checkpoint(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user