The Swift Package Index logo.Swift Package Index

Track the adoption of Swift 6 strict concurrency checks for data race safety. How many packages are Ready for Swift 6?

Build Information

Successful build of coreml-stable-diffusion-swift, reference 1.0.0 (d00632), with Swift 6.0 (beta) for macOS (SPM) on 17 Sep 2024 00:23:31 UTC.

Swift 6 data race errors: 0

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete

Build Log

========================================
RunAll
========================================
Builder version: 4.53.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/igor11191708/coreml-stable-diffusion-swift.git
Reference: 1.0.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/igor11191708/coreml-stable-diffusion-swift
 * tag               1.0.0      -> FETCH_HEAD
HEAD is now at d00632b Update HelperImage.swift
Cloned https://github.com/igor11191708/coreml-stable-diffusion-swift.git
Revision (git rev-parse @):
d00632ba63f7efcf9f0a124715debe09487e5a3b
SUCCESS checkout https://github.com/igor11191708/coreml-stable-diffusion-swift.git at 1.0.0
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/igor11191708/coreml-stable-diffusion-swift.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
[1/1] Compiling plugin GenerateManual
Building for debugging...
[1/5] Write sources
[4/5] Write swift-version-117DEE11B69C53C9.txt
[6/31] Emitting module StableDiffusion
[7/33] Compiling StableDiffusion BPETokenizer+Reading.swift
[8/33] Compiling StableDiffusion BPETokenizer.swift
[9/33] Compiling StableDiffusion MultilingualTextEncoder.swift
[10/33] Compiling StableDiffusion NumPyRandomSource.swift
[11/33] Compiling StableDiffusion NvRandomSource.swift
[12/33] Compiling Files Files.swift
[13/33] Emitting module Files
[14/33] Compiling StableDiffusion RandomSource.swift
[15/33] Compiling StableDiffusion ResourceManaging.swift
[16/33] Compiling StableDiffusion SafetyChecker.swift
[17/33] Compiling StableDiffusion CGImage+vImage.swift
[18/33] Compiling StableDiffusion ControlNet.swift
[19/33] Compiling StableDiffusion DPMSolverMultistepScheduler.swift
[20/33] Compiling StableDiffusion StableDiffusionXL+Resources.swift
[21/33] Compiling StableDiffusion StableDiffusionXLPipeline.swift
[22/33] Compiling StableDiffusion TorchRandomSource.swift
[23/33] Compiling StableDiffusion Unet.swift
[24/33] Compiling StableDiffusion StableDiffusionPipeline.Configuration.swift
[25/33] Compiling StableDiffusion StableDiffusionPipeline.swift
[26/33] Compiling StableDiffusion Decoder.swift
[27/33] Compiling StableDiffusion Encoder.swift
[28/33] Compiling StableDiffusion ManagedMLModel.swift
[29/33] Compiling StableDiffusion SampleTimer.swift
[30/33] Compiling StableDiffusion Scheduler.swift
[31/33] Compiling StableDiffusion StableDiffusionPipeline+Resources.swift
[32/33] Compiling StableDiffusion TextEncoder.swift
[33/33] Compiling StableDiffusion TextEncoderXL.swift
[34/44] Compiling coreml_stable_diffusion_swift GenerativeModel.swift
[35/45] Compiling coreml_stable_diffusion_swift GenerativeManager.swift
/Users/admin/builder/spi-builder-workspace/Sources/coreml-stable-diffusion-swift/manager/GenerativeManager.swift:27:17: warning: non-sendable type '[GenerativeModel]' returned by actor-isolated instance method 'loadModels()' satisfying protocol requirement cannot cross actor boundary; this is an error in the Swift 6 language mode
25 |     /// Load list of models
26 |     /// - Returns: List of  models
27 |     public func loadModels() async -> [GenerativeModel] {
   |                 `- warning: non-sendable type '[GenerativeModel]' returned by actor-isolated instance method 'loadModels()' satisfying protocol requirement cannot cross actor boundary; this is an error in the Swift 6 language mode
28 |          await listOfModels()
29 |     }
/Users/admin/builder/spi-builder-workspace/Sources/coreml-stable-diffusion-swift/model/GenerativeModel.swift:12:15: note: consider making struct 'GenerativeModel' conform to the 'Sendable' protocol
10 | /// Model  profile description
11 | @available(iOS 16.2, macOS 13.1, *)
12 | public struct GenerativeModel: Hashable, Identifiable{
   |               `- note: consider making struct 'GenerativeModel' conform to the 'Sendable' protocol
13 |
14 |     // MARK: - Life circle
/Users/admin/builder/spi-builder-workspace/Sources/coreml-stable-diffusion-swift/manager/GenerativeManager.swift:37:17: warning: non-sendable type 'StableDiffusionPipeline.Configuration' (aka 'PipelineConfiguration') in parameter of the protocol requirement satisfied by actor-isolated instance method 'generate(with:by:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
35 |     /// - Returns: An array of `imageCount` optional images.
36 |     ///            The images will be nil if safety checks were performed and found the result to be un-safe
37 |     public func generate(
   |                 `- warning: non-sendable type 'StableDiffusionPipeline.Configuration' (aka 'PipelineConfiguration') in parameter of the protocol requirement satisfied by actor-isolated instance method 'generate(with:by:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
38 |         with config: StableDiffusionPipeline.Configuration,
39 |         by pipeline: StableDiffusionPipeline
/Users/admin/builder/spi-builder-workspace/.build/checkouts/ml-stable-diffusion/swift/StableDiffusion/pipeline/StableDiffusionPipeline.Configuration.swift:15:15: note: struct 'PipelineConfiguration' does not conform to the 'Sendable' protocol
13 |
14 | /// Image generation configuration
15 | public struct PipelineConfiguration: Hashable {
   |               `- note: struct 'PipelineConfiguration' does not conform to the 'Sendable' protocol
16 |
17 |     /// Text prompt to guide sampling
/Users/admin/builder/spi-builder-workspace/Sources/coreml-stable-diffusion-swift/protocol/IGenerativeManager.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'StableDiffusion'
 7 |
 8 | import Foundation
 9 | import StableDiffusion
   | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'StableDiffusion'
10 | import CoreML
11 |
/Users/admin/builder/spi-builder-workspace/Sources/coreml-stable-diffusion-swift/manager/GenerativeManager.swift:37:17: warning: non-sendable type 'StableDiffusionPipeline' in parameter of the protocol requirement satisfied by actor-isolated instance method 'generate(with:by:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
35 |     /// - Returns: An array of `imageCount` optional images.
36 |     ///            The images will be nil if safety checks were performed and found the result to be un-safe
37 |     public func generate(
   |                 `- warning: non-sendable type 'StableDiffusionPipeline' in parameter of the protocol requirement satisfied by actor-isolated instance method 'generate(with:by:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
38 |         with config: StableDiffusionPipeline.Configuration,
39 |         by pipeline: StableDiffusionPipeline
/Users/admin/builder/spi-builder-workspace/.build/checkouts/ml-stable-diffusion/swift/StableDiffusion/pipeline/StableDiffusionPipeline.swift:60:15: note: struct 'StableDiffusionPipeline' does not conform to the 'Sendable' protocol
 58 | /// [Hugging Face Diffusers Pipeline](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py)
 59 | @available(iOS 16.2, macOS 13.1, *)
 60 | public struct StableDiffusionPipeline: StableDiffusionPipelineProtocol {
    |               `- note: struct 'StableDiffusionPipeline' does not conform to the 'Sendable' protocol
 61 |
 62 |     /// Model to generate embeddings for tokenized input text
/Users/admin/builder/spi-builder-workspace/Sources/coreml-stable-diffusion-swift/manager/GenerativeManager.swift:28:16: warning: non-sendable type '[GenerativeModel]' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
26 |     /// - Returns: List of  models
27 |     public func loadModels() async -> [GenerativeModel] {
28 |          await listOfModels()
   |                `- warning: non-sendable type '[GenerativeModel]' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
29 |     }
30 |
/Users/admin/builder/spi-builder-workspace/Sources/coreml-stable-diffusion-swift/model/GenerativeModel.swift:12:15: note: consider making struct 'GenerativeModel' conform to the 'Sendable' protocol
10 | /// Model  profile description
11 | @available(iOS 16.2, macOS 13.1, *)
12 | public struct GenerativeModel: Hashable, Identifiable{
   |               `- note: consider making struct 'GenerativeModel' conform to the 'Sendable' protocol
13 |
14 |     // MARK: - Life circle
[36/45] Compiling coreml_stable_diffusion_swift IGenerativeManager.swift
[37/45] Compiling coreml_stable_diffusion_swift NSImage+.swift
[38/45] Compiling coreml_stable_diffusion_swift Errors.swift
[39/45] Compiling coreml_stable_diffusion_swift ProgressState.swift
[40/45] Compiling coreml_stable_diffusion_swift HelperFile.swift
[41/45] Compiling coreml_stable_diffusion_swift HelperImage.swift
[42/45] Compiling coreml_stable_diffusion_swift Scheduler.swift
[43/45] Compiling coreml_stable_diffusion_swift URL+.swift
[44/45] Compiling coreml_stable_diffusion_swift HelperPipeline.swift
[45/45] Emitting module coreml_stable_diffusion_swift
/Users/admin/builder/spi-builder-workspace/Sources/coreml-stable-diffusion-swift/manager/GenerativeManager.swift:27:17: warning: non-sendable type '[GenerativeModel]' returned by actor-isolated instance method 'loadModels()' satisfying protocol requirement cannot cross actor boundary; this is an error in the Swift 6 language mode
25 |     /// Load list of models
26 |     /// - Returns: List of  models
27 |     public func loadModels() async -> [GenerativeModel] {
   |                 `- warning: non-sendable type '[GenerativeModel]' returned by actor-isolated instance method 'loadModels()' satisfying protocol requirement cannot cross actor boundary; this is an error in the Swift 6 language mode
28 |          await listOfModels()
29 |     }
/Users/admin/builder/spi-builder-workspace/Sources/coreml-stable-diffusion-swift/model/GenerativeModel.swift:12:15: note: consider making struct 'GenerativeModel' conform to the 'Sendable' protocol
10 | /// Model  profile description
11 | @available(iOS 16.2, macOS 13.1, *)
12 | public struct GenerativeModel: Hashable, Identifiable{
   |               `- note: consider making struct 'GenerativeModel' conform to the 'Sendable' protocol
13 |
14 |     // MARK: - Life circle
/Users/admin/builder/spi-builder-workspace/Sources/coreml-stable-diffusion-swift/manager/GenerativeManager.swift:37:17: warning: non-sendable type 'StableDiffusionPipeline.Configuration' (aka 'PipelineConfiguration') in parameter of the protocol requirement satisfied by actor-isolated instance method 'generate(with:by:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
35 |     /// - Returns: An array of `imageCount` optional images.
36 |     ///            The images will be nil if safety checks were performed and found the result to be un-safe
37 |     public func generate(
   |                 `- warning: non-sendable type 'StableDiffusionPipeline.Configuration' (aka 'PipelineConfiguration') in parameter of the protocol requirement satisfied by actor-isolated instance method 'generate(with:by:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
38 |         with config: StableDiffusionPipeline.Configuration,
39 |         by pipeline: StableDiffusionPipeline
/Users/admin/builder/spi-builder-workspace/.build/checkouts/ml-stable-diffusion/swift/StableDiffusion/pipeline/StableDiffusionPipeline.Configuration.swift:15:15: note: struct 'PipelineConfiguration' does not conform to the 'Sendable' protocol
13 |
14 | /// Image generation configuration
15 | public struct PipelineConfiguration: Hashable {
   |               `- note: struct 'PipelineConfiguration' does not conform to the 'Sendable' protocol
16 |
17 |     /// Text prompt to guide sampling
/Users/admin/builder/spi-builder-workspace/Sources/coreml-stable-diffusion-swift/protocol/IGenerativeManager.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'StableDiffusion'
 7 |
 8 | import Foundation
 9 | import StableDiffusion
   | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'StableDiffusion'
10 | import CoreML
11 |
/Users/admin/builder/spi-builder-workspace/Sources/coreml-stable-diffusion-swift/manager/GenerativeManager.swift:37:17: warning: non-sendable type 'StableDiffusionPipeline' in parameter of the protocol requirement satisfied by actor-isolated instance method 'generate(with:by:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
35 |     /// - Returns: An array of `imageCount` optional images.
36 |     ///            The images will be nil if safety checks were performed and found the result to be un-safe
37 |     public func generate(
   |                 `- warning: non-sendable type 'StableDiffusionPipeline' in parameter of the protocol requirement satisfied by actor-isolated instance method 'generate(with:by:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
38 |         with config: StableDiffusionPipeline.Configuration,
39 |         by pipeline: StableDiffusionPipeline
/Users/admin/builder/spi-builder-workspace/.build/checkouts/ml-stable-diffusion/swift/StableDiffusion/pipeline/StableDiffusionPipeline.swift:60:15: note: struct 'StableDiffusionPipeline' does not conform to the 'Sendable' protocol
 58 | /// [Hugging Face Diffusers Pipeline](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py)
 59 | @available(iOS 16.2, macOS 13.1, *)
 60 | public struct StableDiffusionPipeline: StableDiffusionPipelineProtocol {
    |               `- note: struct 'StableDiffusionPipeline' does not conform to the 'Sendable' protocol
 61 |
 62 |     /// Model to generate embeddings for tokenized input text
Build complete! (37.25s)
warning: 'spi-builder-workspace': /Users/admin/builder/spi-builder-workspace/Package.swift:21:10: warning: 'package(url:_:)' is deprecated: use specific requirement APIs instead (e.g. use 'branch:' instead of '.branch')
19 |     dependencies: [
20 |         // Dependencies declare other packages that this package depends on.
21 |         .package(url: "https://github.com/apple/ml-stable-diffusion.git", .exactItem("1.1.1")),
   |          `- warning: 'package(url:_:)' is deprecated: use specific requirement APIs instead (e.g. use 'branch:' instead of '.branch')
22 |         .package(url: "https://github.com/JohnSundell/Files.git",
23 |                  from: "4.2.0")
Fetching https://github.com/JohnSundell/Files.git
Fetching https://github.com/apple/ml-stable-diffusion.git
Fetching https://github.com/apple/swift-argument-parser.git
[1/1231] Fetching files
[149/3062] Fetching files, ml-stable-diffusion
[1177/15233] Fetching files, ml-stable-diffusion, swift-argument-parser
Fetched https://github.com/JohnSundell/Files.git from cache (2.09s)
Fetched https://github.com/apple/ml-stable-diffusion.git from cache (2.09s)
Computing version for https://github.com/JohnSundell/Files.git
Fetched https://github.com/apple/swift-argument-parser.git from cache (2.09s)
Computed https://github.com/JohnSundell/Files.git at 4.2.0 (0.69s)
Computing version for https://github.com/apple/ml-stable-diffusion.git
Computed https://github.com/apple/ml-stable-diffusion.git at 1.1.1 (0.51s)
Computing version for https://github.com/apple/swift-argument-parser.git
Computed https://github.com/apple/swift-argument-parser.git at 1.5.0 (0.54s)
Creating working copy for https://github.com/JohnSundell/Files.git
Working copy of https://github.com/JohnSundell/Files.git resolved at 4.2.0
Creating working copy for https://github.com/apple/swift-argument-parser.git
Working copy of https://github.com/apple/swift-argument-parser.git resolved at 1.5.0
Creating working copy for https://github.com/apple/ml-stable-diffusion.git
Working copy of https://github.com/apple/ml-stable-diffusion.git resolved at 1.1.1
Build complete.
{
  "dependencies" : [
    {
      "identity" : "ml-stable-diffusion",
      "requirement" : {
        "exact" : [
          "1.1.1"
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/apple/ml-stable-diffusion.git"
    },
    {
      "identity" : "files",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "4.2.0",
            "upper_bound" : "5.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/JohnSundell/Files.git"
    }
  ],
  "manifest_display_name" : "coreml-stable-diffusion-swift",
  "name" : "coreml-stable-diffusion-swift",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "13.0"
    },
    {
      "name" : "ios",
      "version" : "16.2"
    }
  ],
  "products" : [
    {
      "name" : "coreml-stable-diffusion-swift",
      "targets" : [
        "coreml-stable-diffusion-swift"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "coreml_stable_diffusion_swiftTests",
      "module_type" : "SwiftTarget",
      "name" : "coreml-stable-diffusion-swiftTests",
      "path" : "Tests/coreml-stable-diffusion-swiftTests",
      "sources" : [
        "coreml_stable_diffusion_swiftTests.swift"
      ],
      "target_dependencies" : [
        "coreml-stable-diffusion-swift"
      ],
      "type" : "test"
    },
    {
      "c99name" : "coreml_stable_diffusion_swift",
      "module_type" : "SwiftTarget",
      "name" : "coreml-stable-diffusion-swift",
      "path" : "Sources/coreml-stable-diffusion-swift",
      "product_dependencies" : [
        "StableDiffusion",
        "Files"
      ],
      "product_memberships" : [
        "coreml-stable-diffusion-swift"
      ],
      "sources" : [
        "enum/Errors.swift",
        "enum/ProgressState.swift",
        "ext/NSImage+.swift",
        "ext/URL+.swift",
        "helper/HelperFile.swift",
        "helper/HelperImage.swift",
        "helper/HelperPipeline.swift",
        "manager/GenerativeManager.swift",
        "model/GenerativeModel.swift",
        "model/Scheduler.swift",
        "protocol/IGenerativeManager.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.7"
}
warning: 'spi-builder-workspace': /Users/admin/builder/spi-builder-workspace/Package.swift:21:10: warning: 'package(url:_:)' is deprecated: use specific requirement APIs instead (e.g. use 'branch:' instead of '.branch')
19 |     dependencies: [
20 |         // Dependencies declare other packages that this package depends on.
21 |         .package(url: "https://github.com/apple/ml-stable-diffusion.git", .exactItem("1.1.1")),
   |          `- warning: 'package(url:_:)' is deprecated: use specific requirement APIs instead (e.g. use 'branch:' instead of '.branch')
22 |         .package(url: "https://github.com/JohnSundell/Files.git",
23 |                  from: "4.2.0")
Done.