From c70323a99e450c86ee32c6dfefe438fe17f5c2e1 Mon Sep 17 00:00:00 2001 From: Yu Leng Date: Wed, 5 Nov 2025 16:27:20 +0800 Subject: [PATCH] Perf improvement --- src/modules/imageresizer/ui/App.xaml.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/imageresizer/ui/App.xaml.cs b/src/modules/imageresizer/ui/App.xaml.cs index 446bb72830..784b650afa 100644 --- a/src/modules/imageresizer/ui/App.xaml.cs +++ b/src/modules/imageresizer/ui/App.xaml.cs @@ -6,6 +6,7 @@ using System; using System.Globalization; +using System.Runtime.InteropServices; using System.Text; using System.Windows; using ImageResizer.Models; @@ -110,6 +111,12 @@ namespace ImageResizer { try { + // First check if the platform is ARM64 - AI Super Resolution only works on ARM64 + if (RuntimeInformation.ProcessArchitecture != Architecture.Arm64) + { + return AiAvailabilityState.NotSupported; + } + // Check Windows AI service model ready state // it's so slow, why? var readyState = Services.WinAiSuperResolutionService.GetModelReadyState();