Skip to content

In Model.export(), remove the shape arg and the requirement for the shape to be divisible by 14.#400

Open
Abdul-Mukit wants to merge 1 commit intoroboflow:developfrom
Abdul-Mukit:remove_shape_arg_from_main_export_call
Open

In Model.export(), remove the shape arg and the requirement for the shape to be divisible by 14.#400
Abdul-Mukit wants to merge 1 commit intoroboflow:developfrom
Abdul-Mukit:remove_shape_arg_from_main_export_call

Conversation

@Abdul-Mukit
Copy link
Contributor

Description

Closes: #396
In main.py, the Model.export() has the argument shape. Developers often try to use it and find it broken. This makes the export process confusing. See: #396 and #99 (comment)

The clean solution is to define resolution during model initialization. Then just call model.export(). Furthermore, the requirement for the input shape to be divisible by 14 is outdated. See: #396 (comment)
All this makes the shape argument in Model.export() call redundant and confusing.

This MR simply proposes to remove this argument and the requirement that the shape be divisible by 14 from the Model.export() call.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How has this change been tested, please provide a testcase or example of how you tested the change?

Tried these and both worked:

from rfdetr import RFDETRSegPreview, RFDETRMedium
model = RFDETRMedium()
mode.export()
model = RFDETRSegPreview()
model.export()

… call. Remove shape arg from Model.export call.
@Abdul-Mukit
Copy link
Contributor Author

I have read the CLA Document and I sign the CLA.

@CLAassistant
Copy link

CLAassistant commented Oct 9, 2025

CLA assistant check
All committers have signed the CLA.

@Borda Borda requested a review from isaacrob as a code owner February 11, 2026 15:57
@Borda Borda force-pushed the develop branch 4 times, most recently from 60b16c1 to 523f9df Compare February 14, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

During RFDETRSegPreview ONNX export call, why does the desired shape has to be divisible by both 24 and 14?

2 participants

Comments