Skip to content

Commit bd9700e

Browse files
committed
update
1 parent f3814df commit bd9700e

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

Sources/coreml-stable-diffusion-swift/ext/NSImage+.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
// Created by Igor on 23.03.2023.
66
//
77

8-
9-
#if os(macOS)
10-
118
import Foundation
9+
#if canImport(AppKit)
1210
import AppKit
11+
#endif
12+
13+
#if os(macOS)
1314

1415
/// https://stackoverflow.com/questions/24595908/swift-nsimage-to-cgimage
1516
@available(macOS 13.1, *)

Sources/coreml-stable-diffusion-swift/helper/HelperFile.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
// Created by Igor on 22.03.2023.
66
//
77

8-
import AppKit
8+
99
import Files
10+
#if canImport(AppKit)
11+
import AppKit
12+
#endif
1013

11-
#if os(macOS)
1214

15+
#if os(macOS)
1316
/// Get list of models from the models directory
1417
/// - Returns: List of model
1518
@available(macOS 13.1, *)

Sources/coreml-stable-diffusion-swift/helper/HelperImage.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
import Foundation
99
import SwiftUI
10-
11-
#if os(macOS)
12-
10+
#if canImport(AppKit)
1311
import AppKit
12+
#endif
1413

14+
#if os(macOS)
1515
/// Get NSImage from data
1616
/// - Parameters:
1717
/// - data: Data

0 commit comments

Comments
 (0)