File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
Sources/coreml-stable-diffusion-swift Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ let package = Package(
7
7
name: " coreml-stable-diffusion-swift " ,
8
8
platforms: [
9
9
. macOS( . v13) ,
10
- . iOS( . v16 ) ,
10
+ . iOS( " 16.2 " ) , // Updated to support iOS 16.2
11
11
] ,
12
12
products: [
13
13
// Products define the executables and libraries a package produces, and make them visible to other packages.
@@ -17,7 +17,7 @@ let package = Package(
17
17
] ,
18
18
dependencies: [
19
19
// Dependencies declare other packages that this package depends on.
20
- . package ( url: " https://github.com/apple/ml-stable-diffusion.git " , . exactItem( " 0.3.0 " ) ) ,
20
+ . package ( url: " https://github.com/apple/ml-stable-diffusion.git " , . exactItem( " 1.1.1 " ) ) ,
21
21
. package ( url: " https://github.com/JohnSundell/Files.git " ,
22
22
from: " 4.2.0 " )
23
23
] ,
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public func initFolder(name : String) throws{
56
56
#elseif os(iOS)
57
57
/// Get list of models from the models directory
58
58
/// - Returns: List of model
59
- @available ( iOS 16 . 0 , * )
59
+ @available ( iOS 16 . 2 , * )
60
60
internal func listOfModels( ) async -> [ GenerativeModel ] {
61
61
guard let docs = Folder . documents, let folder = try ? docs. subfolder ( at: " models " ) else {
62
62
return [ ]
@@ -68,7 +68,7 @@ internal func listOfModels() async -> [GenerativeModel] {
68
68
}
69
69
70
70
/// Show the models directory in the Files app
71
- @available ( iOS 16 . 0 , * )
71
+ @available ( iOS 16 . 2 , * )
72
72
public func showInFilesApp( ) {
73
73
guard let url = Folder . documents? . url else { return }
74
74
@@ -79,7 +79,7 @@ public func showInFilesApp() {
79
79
/// Create a folder
80
80
/// - Parameter name: Name of the folder to create
81
81
/// - Throws: Could not create a folder
82
- @available ( iOS 16 . 0 , * )
82
+ @available ( iOS 16 . 2 , * )
83
83
public func initFolder( name: String ) throws {
84
84
if let docs = Folder . documents {
85
85
if docs. containsSubfolder ( named: name) == false {
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ public func getDiffusionPipeline(
29
29
config. computeUnits = computeUnits
30
30
31
31
return try . init(
32
- resourcesAt: url,
32
+ resourcesAt: url, controlNet : [ ] ,
33
33
configuration : config,
34
34
disableSafety: disableSafety,
35
35
reduceMemory : reduceMemory
Original file line number Diff line number Diff line change 8
8
import Foundation
9
9
10
10
/// Model profile description
11
- @available ( iOS 16 . 0 , macOS 13 . 1 , * )
11
+ @available ( iOS 16 . 2 , macOS 13 . 1 , * )
12
12
public struct GenerativeModel : Hashable , Identifiable {
13
13
14
14
// MARK: - Life circle
You can’t perform that action at this time.
0 commit comments