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

Adding static model support for ONNX build #965

Open
beike623 opened this issue Jul 10, 2024 Discussed in #844 · 2 comments
Open

Adding static model support for ONNX build #965

beike623 opened this issue Jul 10, 2024 Discussed in #844 · 2 comments
Labels
enhancement New feature or request

Comments

@beike623
Copy link

Discussed in #844

Originally posted by Blinue March 10, 2024
This discussion was created from the release onnx-preview1.

I am using the onnx build for real-time antialiasing. Some models I have created only allow for static onnx builds instead of the dynamic required for magpie. These models have a better image quality with acceptable speed. Would it be possible to add support for static models in the future?

@Blinue
Copy link
Owner

Blinue commented Jul 10, 2024

I don’t understand why the linking method would affect the functionality of onnxruntime. Is there any documentation on this?

@Blinue Blinue added the enhancement New feature or request label Jul 10, 2024
@beike623
Copy link
Author

beike623 commented Jul 10, 2024

To clarify, certain upscale architectures include dysample or other features that can't be converted to onnx without specifying a static shape. This is referenced in the wiki for converting pth to onnx with neosr: https://github.com/muslll/neosr/wiki/Model-Conversion. These models I mentioned can be converted to onnx and used in other upscaling software including Chainner, but they don't seem to work with Magpie. Magpie seems to only support onnx models that are dymanic, supporting the following: "Input and output dimensions must be [-1, 3, -1, -1], with data format NCHW.". A static model may have a different shape, for example: (1, 3, 256, 256). Other software, including Chainner, seem to upscale the image in tiles (256x256 in this case) and stitch them together to create the upscaled image. I was hoping that magpie would start supporting static onnx models like Chainner does, which would allow for more advanced upscaling arches to be supported.

GitHub
neosr is a framework for training real-world single-image super-resolution networks. - muslll/neosr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants