Lednik7 / CLIP-ONNX

It is a simple library to speed up CLIP inference up to 3x (K80 GPU)
MIT License
179 stars 23 forks source link

ERROR: missing-standard-symbolic-function #15

Closed susht3 closed 8 months ago

susht3 commented 8 months ago

[CLIP ONNX] Start convert visual model ============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 ============= verbose: False, log level: Level.ERROR ======================= 0 NONE 0 NOTE 0 WARNING 1 ERROR ======================== ERROR: missing-standard-symbolic-function

Exporting the operator 'aten::unflatten' to ONNX opset version 11 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub: https://github.com/pytorch/pytorch/issues. None

Traceback (most recent call last): File "convert.py", line 124, in visual_path, textual_path = make_onnx(vis_model_dir, text_model_dir) File "convert.py", line 37, in make_onnx onnx_model.convert2onnx(image, text, verbose=True) File "/nvme/nvme0//clip/CLIP-ONNX/clip_onnx/clip_converter.py", line 102, in convert2onnx self.convert_visual(visual_input, visual_wrapper, visual_export_params) File "/nvme/nvme0//clip/CLIP-ONNX/clip_onnx/clip_converter.py", line 52, in convert_visual torch.onnx.export(visual, File "/nvme/nvme0/conda3/envs/py3/lib/python3.8/site-packages/torch/onnx/utils.py", line 506, in export _export( File "/nvme/nvme0/anaconda3/envs/py3/lib/python3.8/site-packages/torch/onnx/utils.py", line 1548, in _export graph, params_dict, torch_out = _model_to_graph( File "/nvme/nvme0//anaconda3/envs/py3/lib/python3.8/site-packages/torch/onnx/utils.py", line 1117, in _model_to_graph graph = _optimize_graph( File "/nvme/nvme0/onda3/envs/py3/lib/python3.8/site-packages/torch/onnx/utils.py", line 665, in _optimize_graph graph = _C._jit_pass_onnx(graph, operator_export_type) File "/nvme/nvme0/anaconda3/envs/py3/lib/python3.8/site-packages/torch/onnx/utils.py", line 1901, in _run_symbolic_fun ction raise errors.UnsupportedOperatorError( torch.onnx.errors.UnsupportedOperatorError: Exporting the operator 'aten::unflatten' to ONNX opset version 11 is not supported. Pl ease feel free to request support or submit a pull request on PyTorch GitHub: https://github.com/pytorch/pytorch/issues.