Blinue / Magpie

An all-purpose window upscaler for Windows 10/11.
GNU General Public License v3.0
9.18k stars 485 forks source link

[Feature Request] ONNX support #772

Open FNsi opened 10 months ago

FNsi commented 10 months ago

In compact structure (model size 256k~4m) that would be a runtime effect base on DirectMl

Am I so greedy?😂

HIllya51 commented 6 months ago

Kindly note that only DirectML backend is supported by non-NVIDIA graphics cards. Can you provide the logs to help diagnose the problem?

logs.zip

Blinue commented 6 months ago

It’s likely due to OOM; I suspect the integrated graphics card doesn’t have sufficient resources to perform the inference. Can you share the ONNX file you’re using?

HIllya51 commented 6 months ago

It’s likely due to OOM; I suspect the integrated graphics card doesn’t have sufficient resources to perform the inference. Can you share the ONNX file you’re using?

I just use the 2x_AnimeJaNai_HD_V3_UltraCompact_425k-fp16.onnx

Blinue commented 6 months ago

I just use the 2x_AnimeJaNai_HD_V3_UltraCompact_425k-fp16.onnx

For effective inference on the UC model, a minimum of a 3060 GPU is essential. While it might be feasible to run much smaller models on integrated graphics cards, it doesn’t make much sense to do so: for tiny models, HLSL is significantly faster.

hooke007 commented 6 months ago

Does the ONNX version not support Integrated graphics? The screen will go black on the AMD R6-6600H CPU...

If you only want to verify if ONNX would work. I only suggest use "tiny" model on IGPU(i.e. https://github.com/Blinue/Magpie/issues/847#issuecomment-1988711628)

HIllya51 commented 6 months ago

I just use the 2x_AnimeJaNai_HD_V3_UltraCompact_425k-fp16.onnx

For effective inference on the UC model, a minimum of a 3060 GPU is essential. While it might be feasible to run much smaller models on integrated graphics cards, it doesn’t make much sense to do so: for tiny models, HLSL is significantly faster.

Does the ONNX version not support Integrated graphics? The screen will go black on the AMD R6-6600H CPU...

If you only want to verify if ONNX would work. I only suggest use "tiny" model on IGPU(i.e. #847 (comment))

I conducted some tests again and found that it can scale certain windows correctly (nodepad, calculator, window terminal), but it may black out for certain windows (explorer, some games) so it may not be an error caused by ONNX, but rather a bug in window capture

Blinue commented 6 months ago

I conducted some tests again and found that it can scale certain windows correctly (nodepad, calculator, window terminal), but it may black out for certain windows (explorer, some games) so it may not be an error caused by ONNX, but rather a bug in window capture

I believe this is related to the window size. Scaling larger windows requires more VRAM, leading to OOM.

HIllya51 commented 6 months ago

I conducted some tests again and found that it can scale certain windows correctly (nodepad, calculator, window terminal), but it may black out for certain windows (explorer, some games) so it may not be an error caused by ONNX, but rather a bug in window capture

I believe this is related to the window size. Scaling larger windows requires more VRAM, leading to OOM.

I have tested it, and for the software I mentioned earlier that can be scaled, no matter how I resize it, it can scale normally. For software that cannot be scaled, no matter how I resize it, it will black screen

Blinue commented 6 months ago

@HIllya51 Could you create an issue for this problem?

keyrwhf commented 4 months ago

Thank you so much! I love this tool. I apologize for my English; it’s not very good. However, I’m facing an issue. I’m using Magpie with Textractor to read a Visual Novel game. In this ONNX preview version, it only supports the graphic capture method; other methods don’t work. Textractor generates an extra window text box that stays “Always on top” to display text. When I use the graphic capture method, the text box disappears. However, the Desktop Duplication method works with Textractor, and the text box doesn’t disappear. Can you please help?

Blinue commented 4 months ago

In the onnx-preview1 version, only Graphics Capture is functional; other capture methods have not been adapted. It's merely a technical preview, so stay tuned for future updates.