mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 10:02:22 +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)
|
||||
|
||||
model = get_model(args).eval().to(device)
|
||||
checkpoint = torch.load(args.model_path, map_location="cpu", weights_only=True)
|
||||
|
||||
if "model_state_dict" or "ema_model_state_dict" in checkpoint:
|
||||
checkpoint = torch.load(args.model_path, map_location="cpu")
|
||||
if "ema_model_state_dict" in checkpoint or 'model_state_dict' in checkpoint:
|
||||
model = load_F5_TTS_pretrained_checkpoint(model, args.model_path)
|
||||
else:
|
||||
_ = load_checkpoint(
|
||||
|
Loading…
x
Reference in New Issue
Block a user