Skip to content

Commit 02f109e

Browse files
committed
Update Availability
1 parent bdfbb88 commit 02f109e

13 files changed

+17
-17
lines changed

swift/StableDiffusion/pipeline/Decoder.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import CoreML
66
import Accelerate
77

88
/// A decoder model which produces RGB images from latent samples
9-
@available(iOS 16.0, macOS 13.0, *)
9+
@available(iOS 16.2, macOS 13.1, *)
1010
public struct Decoder {
1111

1212
/// VAE decoder model

swift/StableDiffusion/pipeline/Random.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import CoreML
99
/// This implementation matches:
1010
/// [NumPy's older randomkit.c](https://github.com/numpy/numpy/blob/v1.0/numpy/random/mtrand/randomkit.c)
1111
///
12-
@available(iOS 16.0, macOS 13.0, *)
12+
@available(iOS 16.2, macOS 13.1, *)
1313
struct NumPyRandomSource: RandomNumberGenerator {
1414

1515
struct State {

swift/StableDiffusion/pipeline/SafetyChecker.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import CoreML
66
import Accelerate
77

88
/// Image safety checking model
9-
@available(iOS 16.0, macOS 13.0, *)
9+
@available(iOS 16.2, macOS 13.1, *)
1010
public struct SafetyChecker {
1111

1212
/// Safety checking Core ML model

swift/StableDiffusion/pipeline/SampleTimer.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import Foundation
1818
/// print(String(format: "mean: %.2f, var: %.2f",
1919
/// timer.mean, timer.variance))
2020
/// ```
21-
@available(iOS 16.0, macOS 13.0, *)
21+
@available(iOS 16.2, macOS 13.1, *)
2222
public final class SampleTimer: Codable {
2323
var startTime: CFAbsoluteTime?
2424
var sum: Double = 0.0

swift/StableDiffusion/pipeline/Scheduler.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import CoreML
99
/// [Hugging Face Diffusers PNDMScheduler](https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_pndm.py)
1010
///
1111
/// It uses the pseudo linear multi-step (PLMS) method only, skipping pseudo Runge-Kutta (PRK) steps
12-
@available(iOS 16.0, macOS 13.0, *)
12+
@available(iOS 16.2, macOS 13.1, *)
1313
public final class Scheduler {
1414
/// Number of diffusion steps performed during training
1515
public let trainStepCount: Int
@@ -225,7 +225,7 @@ public final class Scheduler {
225225
}
226226
}
227227

228-
@available(iOS 16.0, macOS 13.0, *)
228+
@available(iOS 16.2, macOS 13.1, *)
229229
extension Scheduler {
230230
/// How to map a beta range to a sequence of betas to step over
231231
public enum BetaSchedule {

swift/StableDiffusion/pipeline/StableDiffusionPipeline+Resources.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import Foundation
55
import CoreML
66

7-
@available(iOS 16.0, macOS 13.0, *)
7+
@available(iOS 16.2, macOS 13.1, *)
88
public extension StableDiffusionPipeline {
99

1010
/// Create stable diffusion pipeline using model resources at a

swift/StableDiffusion/pipeline/StableDiffusionPipeline.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import CoreGraphics
1010
///
1111
/// This implementation matches:
1212
/// [Hugging Face Diffusers Pipeline](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py)
13-
@available(iOS 16.0, macOS 13.0, *)
13+
@available(iOS 16.2, macOS 13.1, *)
1414
public struct StableDiffusionPipeline {
1515

1616
/// Model to generate embeddings for tokenized input text
@@ -216,7 +216,7 @@ public struct StableDiffusionPipeline {
216216

217217
}
218218

219-
@available(iOS 16.0, macOS 13.0, *)
219+
@available(iOS 16.2, macOS 13.1, *)
220220
extension StableDiffusionPipeline {
221221
/// Sampling progress details
222222
public struct Progress {

swift/StableDiffusion/pipeline/TextEncoder.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Foundation
55
import CoreML
66

77
/// A model for encoding text
8-
@available(iOS 16.0, macOS 13.0, *)
8+
@available(iOS 16.2, macOS 13.1, *)
99
public struct TextEncoder {
1010

1111
/// Text tokenizer

swift/StableDiffusion/pipeline/Unet.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Foundation
55
import CoreML
66

77
/// U-Net noise prediction model for stable diffusion
8-
@available(iOS 16.0, macOS 13.0, *)
8+
@available(iOS 16.2, macOS 13.1, *)
99
public struct Unet {
1010

1111
/// Model used to predict noise residuals given an input, diffusion time step, and conditional embedding

swift/StableDiffusion/tokenizer/BPETokenizer+Reading.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import Foundation
55

6-
@available(iOS 16.0, macOS 13.0, *)
6+
@available(iOS 16.2, macOS 13.1, *)
77
extension BPETokenizer {
88
enum FileReadError: Error {
99
case invalidMergeFileLine(Int)

swift/StableDiffusion/tokenizer/BPETokenizer.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import Foundation
55

66
/// A tokenizer based on byte pair encoding.
7-
@available(iOS 16.0, macOS 13.0, *)
7+
@available(iOS 16.2, macOS 13.1, *)
88
public struct BPETokenizer {
99
/// A dictionary that maps pairs of tokens to the rank/order of the merge.
1010
let merges: [TokenPair : Int]
@@ -167,7 +167,7 @@ public struct BPETokenizer {
167167
}
168168
}
169169

170-
@available(iOS 16.0, macOS 13.0, *)
170+
@available(iOS 16.2, macOS 13.1, *)
171171
extension BPETokenizer {
172172

173173
/// A hashable tuple of strings

swift/StableDiffusionCLI/main.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Foundation
88
import StableDiffusion
99
import UniformTypeIdentifiers
1010

11-
@available(iOS 16.0, macOS 13.0, *)
11+
@available(iOS 16.2, macOS 13.1, *)
1212
struct StableDiffusionSample: ParsableCommand {
1313

1414
static let configuration = CommandConfiguration(
@@ -172,7 +172,7 @@ enum RunError: Error {
172172
case saving(String)
173173
}
174174

175-
@available(iOS 16.0, macOS 13.0, *)
175+
@available(iOS 16.2, macOS 13.1, *)
176176
enum ComputeUnits: String, ExpressibleByArgument, CaseIterable {
177177
case all, cpuAndGPU, cpuOnly, cpuAndNeuralEngine
178178
var asMLComputeUnits: MLComputeUnits {

swift/StableDiffusionTests/StableDiffusionTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import XCTest
55
import CoreML
66
@testable import StableDiffusion
77

8-
@available(iOS 16.0, macOS 13.0, *)
8+
@available(iOS 16.2, macOS 13.1, *)
99
final class StableDiffusionTests: XCTestCase {
1010

1111
var vocabFileInBundleURL: URL {

0 commit comments

Comments
 (0)