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

Save Model: support TorchScript #3030

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JeremyRand
Copy link
Contributor

Various software requires models in TorchScript format. As one example, this can be used to convert PyTorch models to ncnn models via PNNX, without using ONNX as an intermediary.

Various software requires models in TorchScript format. As one example,
this can be used to convert PyTorch models to ncnn models via PNNX,
without using ONNX as an intermediary.
@JeremyRand
Copy link
Contributor Author

I'm not quite sure what the Pyright warning is about; that line is based on PyTorch and ncnn docs, and it seems to work fine. Suggestions on how to make Pyright happy would be welcome.

@joeyballentine
Copy link
Member

If there's an assertion you can make about the type of trace to make Pyright know it's an instance of some class, then that would be one way. Otherwise, if you're sure this works and it's complaining for no reason, just throw an ignore comment on it so it stops complaining

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.

2 participants