[Help] torch to onnx export

Hi guys
I tried to export GitHub - autonomousvision/unimatch: [TPAMI'23] Unifying Flow, Stereo and Depth Estimation model to onnx

torch.onnx.export(model, # model being run args=(right, left, 'self_swin2d_cross_swin1d', [2, 8], [-1, 4], [-1, 1], 3, False, 'stereo', None, None, 1. / 0.5, 1. / 10, 64, False, False), # model input (or a tuple for multiple inputs) f="test.onnx", # where to save the model (can be a file or file-like object) verbose=True, export_params=True, # store the trained parameter weights inside the model file opset_version=16, # the ONNX version to export the model to do_constant_folding=True, # whether to execute constant folding for optimization input_names = ['img0', 'img1', 'attn_type', 'attn_splits_list', 'corr_radius_list', 'prop_radius_list', 'num_reg_refine', 'pred_bidir_flow' , 'task', 'intrinsics', 'pose', 'min_depth', 'max_depth', 'num_depth_candidates', 'depth_from_argmax', 'pred_bidir_depth'], # the model's input names output_names = ['flow_preds'])
The code runs fine, no error message is shown, but here comes the problem with exporting:

[code] File c:\ProgramData\Anaconda3\lib\site-packages\torch\onnx\utils.py:506, in export(model, args, f, export_params, verbose, training, input_names, output_names, operator_export_type, opset_version, do_constant_folding, dynamic_axes, keep_initializers_as_inputs, custom_opsets, export_modules_as_functions)
188 @_beartype.beartype
189 def export(
190 model: Union[torch.nn.Module, torch.jit.ScriptModule, torch.jit.ScriptFunction],
(…)
206 export_modules_as_functions: Union[bool, Collection[Type[torch.nn.Module]]] = False,
207 ) → None:
208 r""“Exports a model into ONNX format.
209
210 If model is not a :class:torch.jit.ScriptModule nor a
(…)
503 All errors are subclasses of :class:errors.OnnxExporterError.
504 “””
→ 506 _export(
507 model,
508 args,
509 f,
510 export_params,
511 verbose,
512 training,
513 input_names,
514 output_names,
515 operator_export_type=operator_export_type,
516 opset_version=opset_version,
517 do_constant_folding=do_constant_folding,
518 dynamic_axes=dynamic_axes,
519 keep_initializers_as_inputs=keep_initializers_as_inputs,
520 custom_opsets=custom_opsets,
521 export_modules_as_functions=export_modules_as_functions,
522 )

File c:\ProgramData\Anaconda3\lib\site-packages\torch\onnx\utils.py:1551, in _export(model, args, f, export_params, verbose, training, input_names, output_names, operator_export_type, export_type, opset_version, do_constant_folding, dynamic_axes, keep_initializers_as_inputs, fixed_batch_size, custom_opsets, add_node_names, onnx_shape_inference, export_modules_as_functions)
1548 dynamic_axes = {}
1549 _validate_dynamic_axes(dynamic_axes, model, input_names, output_names)
→ 1551 graph, params_dict, torch_out = _model_to_graph(
1552 model,
1553 args,
1554 verbose,
1555 input_names,
1556 output_names,
1557 operator_export_type,
1558 val_do_constant_folding,
1559 fixed_batch_size=fixed_batch_size,
1560 training=training,
1561 dynamic_axes=dynamic_axes,
1562 )
1564 # TODO: Don’t allocate a in-memory string for the protobuf
1565 defer_weight_export = (
1566 export_type is not _exporter_states.ExportTypes.PROTOBUF_FILE
1567 )

File c:\ProgramData\Anaconda3\lib\site-packages\torch\onnx\utils.py:1163, in _model_to_graph(model, args, verbose, input_names, output_names, operator_export_type, do_constant_folding, _disable_torch_constant_prop, fixed_batch_size, training, dynamic_axes)
1156 # print(type(output_tensors))
1157 # print(output_tensors)
1158 # print(type(graph[0]))
1159 # assign_output_shape pass is not compatible with quantized outputs.
1160 # Quantized outputs are flattened to 3 values in ONNX, while packed as
1161 # single value in PyTorch.
1162 if not any(getattr(out, “is_quantized”, False) for out in output_tensors):
→ 1163 _C._jit_pass_onnx_assign_output_shape(
1164 graph,
1165 output_tensors,
1166 out_desc,
1167 GLOBALS.onnx_shape_inference,
1168 is_script,
1169 GLOBALS.export_onnx_opset_version,
1170 )
1172 _set_input_and_output_names(graph, input_names, output_names)
1173 params_dict = _get_named_param_dict(graph, params)

RuntimeError: Expected a sequence type, but received a non-iterable type in graph output index 0 [/code]

I would be very grateful for any help or advice