Skip to content

SAM3 support #116

@Molanda

Description

@Molanda

Please add support for SAM3.

I tried to use SamOnnxConfig but the configuration is quite different. Any thoughts on how to create a new config as I'm new to this.

from optimum.exporters.onnx import main_export
from optimum.exporters.onnx.model_configs import SamOnnxConfig
from transformers.models.sam3 import Sam3Config


model_id = 'model/sam3'
config = Sam3Config.from_pretrained(model_id)
main_export(
    model_id,
    output='model/sam3_onnx',
    task='feature-extraction',
    custom_onnx_configs={
        'model': SamOnnxConfig(config),
    }
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions