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

torch.jit support #24

Open
stjbb opened this issue Apr 11, 2024 · 0 comments
Open

torch.jit support #24

stjbb opened this issue Apr 11, 2024 · 0 comments

Comments

@stjbb
Copy link

stjbb commented Apr 11, 2024

Does your model not support torch.jit? I encounter an error when trying to convert the model with the following code. If there is a solution, please let me know.

import torch
from edge_sam import SamPredictor, sam_model_registry

sam_checkpoint = "./weights/edge_sam.pth"
model_type = "edge_sam"

# load model and run
sam = sam_model_registry[model_type](checkpoint=sam_checkpoint)
sam_jit = torch.jit.script(copy.deepcopy(sam))
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

1 participant