Bethie commited on
Commit
c60387a
·
verified ·
1 Parent(s): 67f650b

Upload code_convert/convert_proj.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. code_convert/convert_proj.py +2 -2
code_convert/convert_proj.py CHANGED
@@ -28,13 +28,13 @@ image_proj_model.load_state_dict(state_dict["image_proj"])
28
 
29
  clip_image_embeds = torch.rand((1, 1280))
30
 
31
- onnx_output_path = '/home/new_onnx/proj/model.onnx'
32
  torch.onnx.export(
33
  image_proj_model,
34
  clip_image_embeds,
35
  onnx_output_path,
36
  export_params=True,
37
- opset_version=16,
38
  do_constant_folding=True,
39
  input_names=['clip_image_embeds'],
40
  output_names=['image_prompt_embeds'],
 
28
 
29
  clip_image_embeds = torch.rand((1, 1280))
30
 
31
+ onnx_output_path = 'model.onnx'
32
  torch.onnx.export(
33
  image_proj_model,
34
  clip_image_embeds,
35
  onnx_output_path,
36
  export_params=True,
37
+ opset_version=18,
38
  do_constant_folding=True,
39
  input_names=['clip_image_embeds'],
40
  output_names=['image_prompt_embeds'],