Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ONNX export #33

Open
omidb opened this issue Feb 7, 2024 · 1 comment
Open

ONNX export #33

omidb opened this issue Feb 7, 2024 · 1 comment

Comments

@omidb
Copy link

omidb commented Feb 7, 2024

I was trying to export pytorch model to onnx model using the export_model function in huggingface spaces demo file:

https://huggingface.co/spaces/stevengrove/YOLO-World/blob/main/tools/demo.py#L92

However, doing so results in the error

torch.onnx.errors.SymbolicValueError: Unsupported: ONNX export of operator adaptive_max_pool2d, output size that are not factor of input size. Please feel free to request support or submit a pull request on PyTorch GitHub: https://github.com/pytorch/pytorch/issues  [Caused by the value '1303 defined in (%1303 : Long(2, strides=[1], device=cpu) = onnx::Constant[value= 3  3 [ CPULongType{2} ]]()

I was confused on how should i proceed here.

Pre-trained model ckpt file: yolow-v8_l_clipv2_frozen_t2iv2_bn_o365_goldg_pretrain.pth

And config file used for runner loading: HERE

@wondervictor
Copy link
Collaborator

Hi @omidb, thanks for your interest in YOLO-World. We adopt an improved version (hasn't been formally released) in the HuggingFace demo. We currently release the v1.0 of YOLO-World on GitHub. The export in the HuggingFace demo can not be directly used for the GitHub version. We suggest you use the full code in the HuggingFace demo for exporting and converting now. And we will provide the exporting code for the GitHub version later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants