Skip to content

Conversation

@isaacrob-roboflow
Copy link
Collaborator

Description

Fixes an issue where during JIT tracing of an object detector a NoneType would be returned for a placeholder for the mask object which is incompatible with JIT. Fixed by returning a variable-length tuple instead

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

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

tested locally

Any specific deployment considerations

For example, documentation changes, usability, usage/costs, secrets, etc.

Docs

  • Docs updated? What were the changes:

@probicheaux probicheaux merged commit cda139e into develop Oct 15, 2025
2 checks passed
@software-ai-life
Copy link

Good catch overall 👍
However, there's a small logical issue here:

After converting predictions from a tuple to a dict,
the length check (len(predictions) == 3) will never be true,
so pred_masks will never be added to the output.

Suggested fix:

if len(predictions) == 3:
    predictions = {
        "pred_boxes": predictions[0],
        "pred_logits": predictions[1],
        "pred_masks": predictions[2],
    }
else:
    predictions = {
        "pred_boxes": predictions[0],
        "pred_logits": predictions[1],
    }

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

Successfully merging this pull request may close these issues.

4 participants