# Model conversion issue : yusuf802/Leaf-Disease-Predictor

**URL:** <https://discuss.huggingface.co/t/model-conversion-issue-yusuf802-leaf-disease-predictor/108052>\
**Category:** Models\
**Created:** [September 23, 2024, 6:33am UTC](https://discuss.huggingface.co/t/model-conversion-issue-yusuf802-leaf-disease-predictor/108052 "2024-09-23T06:33:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShubhamGhait](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@ShubhamGhait](https://discuss.huggingface.co/u/ShubhamGhait)\
**Post date:** [September 23, 2024, 6:33am UTC](https://discuss.huggingface.co/t/model-conversion-issue-yusuf802-leaf-disease-predictor/108052/1 "2024-09-23T06:33:21Z")

</div>

Coud you guide for the below issue:  
I am trying to convert leaf disease pytorch pretrained into tflite.  
but facing issue related unsqueeze dimension and tensor flow back end is not supported. while convert from safe-tensor model to onnx(while opset\< 13) and onnx to .pb model (while opset \> 13).

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 23, 2024, 7:15am UTC](https://discuss.huggingface.co/t/model-conversion-issue-yusuf802-leaf-disease-predictor/108052/2 "2024-09-23T07:15:52Z")

</div>

> **[onnx-community (ONNX Community)](https://huggingface.co/onnx-community)**
>
> Org profile for ONNX Community on Hugging Face, the AI community building the future.

Of course you can use the forum, but I think you’ll get an answer very quickly if you go to the ONNX community, randomly select a repo and open a Discussion and ask. It’s quite hard to get the author to realise you’re talking about a problem on a forum…

Have you tried this already?

> [@How can I export a transformers model into onnx that not supported with optimum yet](https://discuss.huggingface.co/t/how-can-i-export-a-transformers-model-into-onnx-that-not-supported-with-optimum-yet/104590/8):
>
> Hi, The easiest is to do it as explained in this guide: [Convert Transformers to ONNX with Hugging Face Optimum](https://www.philschmid.de/convert-transformers-to-onnx#export-with-torchonnx-low-level). You can use torch.onnx.export, which is more low-level than Optimum. Feel free to open an issue on the [Optimum repository](https://github.com/huggingface/optimum) to add support for RT-DETR.
