From c8718f670da2d780acf7a8fc2104960a4b8d0e0e Mon Sep 17 00:00:00 2001 From: Igor Date: Thu, 25 Jul 2024 13:35:50 +0200 Subject: [PATCH] Update HelperImage.swift --- Sources/coreml-stable-diffusion-swift/helper/HelperImage.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/coreml-stable-diffusion-swift/helper/HelperImage.swift b/Sources/coreml-stable-diffusion-swift/helper/HelperImage.swift index 78c4725..0f71236 100644 --- a/Sources/coreml-stable-diffusion-swift/helper/HelperImage.swift +++ b/Sources/coreml-stable-diffusion-swift/helper/HelperImage.swift @@ -18,6 +18,7 @@ import AppKit /// - toSize: Fit to size /// - Returns: NSImage @available(macOS 13.1, *) +@MainActor public func getNSImage(from data : Data?, cropped toSize : NSSize? = nil) async -> NSImage? { guard let value = data else{