mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 03:37:59 +01:00
Perf improvement
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user