Upload code_convert/convert_proj.py with huggingface_hub
Browse files
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 = '
|
32 |
torch.onnx.export(
|
33 |
image_proj_model,
|
34 |
clip_image_embeds,
|
35 |
onnx_output_path,
|
36 |
export_params=True,
|
37 |
-
opset_version=
|
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'],
|