This commit is contained in:
Yu Leng
2025-11-05 15:29:18 +08:00
parent 150e09bedb
commit fb36d9965e
2 changed files with 2 additions and 7 deletions

View File

@@ -96,13 +96,6 @@ namespace ImageResizer
{
try
{
bool isArchitectureSupported = System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture == System.Runtime.InteropServices.Architecture.Arm64;
if (!isArchitectureSupported)
{
return AiAvailabilityState.NotSupported;
}
// Check Windows AI service model ready state
var readyState = Services.WinAiSuperResolutionService.GetModelReadyState();
@@ -116,6 +109,7 @@ namespace ImageResizer
return AiAvailabilityState.ModelNotReady;
case Microsoft.Windows.AI.AIFeatureReadyState.DisabledByUser:
case Microsoft.Windows.AI.AIFeatureReadyState.NotSupportedOnCurrentSystem:
default:
return AiAvailabilityState.NotSupported;
}

View File

@@ -23,6 +23,7 @@ namespace ImageResizer.Services
private bool _disposed;
/// <summary>
/// Initializes a new instance of the <see cref="WinAiSuperResolutionService"/> class.
/// Private constructor. Use CreateAsync() factory method to create instances.
/// </summary>
private WinAiSuperResolutionService(ImageScaler imageScaler)