Perf improvement

This commit is contained in:
Yu Leng
2025-11-05 16:27:20 +08:00
parent 9c02956370
commit c70323a99e

View File

@@ -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();