Skip to content

Commit

Permalink
Fix seaco onnx export bug (#2325)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtlzhuangz authored Dec 21, 2024
1 parent b5ad7c8 commit fcb2102
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion funasr/utils/export_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ def _onnx(

device = kwargs.get("device", "cpu")
dummy_input = model.export_dummy_inputs()
dummy_input = (dummy_input[0].to(device), dummy_input[1].to(device))

if isinstance(dummy_input, torch.Tensor):
dummy_input = dummy_input.to(device)
else:
dummy_input = tuple([input.to(device) for input in dummy_input])


verbose = kwargs.get("verbose", False)
Expand Down

0 comments on commit fcb2102

Please sign in to comment.