mirror of
https://github.com/GayPizzaSpecifications/stable-diffusion-rpc.git
synced 2025-08-05 14:31:32 +00:00
update to latest versions
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
// swiftlint:disable all
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: image_generation.proto
|
||||
@ -10,7 +11,6 @@
|
||||
///*
|
||||
/// Image generation for the Stable Diffusion RPC service.
|
||||
|
||||
import Foundation
|
||||
import SwiftProtobuf
|
||||
|
||||
// If the compiler emits an error on this type, it is because this file
|
||||
@ -25,7 +25,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
|
||||
|
||||
///*
|
||||
/// Represents a request to generate images using a loaded model.
|
||||
public struct SdGenerateImagesRequest {
|
||||
public struct SdGenerateImagesRequest: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@ -109,7 +109,7 @@ public struct SdGenerateImagesRequest {
|
||||
|
||||
///*
|
||||
/// Represents the response from image generation.
|
||||
public struct SdGenerateImagesResponse {
|
||||
public struct SdGenerateImagesResponse: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@ -129,7 +129,7 @@ public struct SdGenerateImagesResponse {
|
||||
|
||||
///*
|
||||
/// Represents a progress update for an image generation batch.
|
||||
public struct SdGenerateImagesBatchProgressUpdate {
|
||||
public struct SdGenerateImagesBatchProgressUpdate: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@ -152,7 +152,7 @@ public struct SdGenerateImagesBatchProgressUpdate {
|
||||
|
||||
///*
|
||||
/// Represents a completion of an image generation batch.
|
||||
public struct SdGenerateImagesBatchCompletedUpdate {
|
||||
public struct SdGenerateImagesBatchCompletedUpdate: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@ -172,7 +172,7 @@ public struct SdGenerateImagesBatchCompletedUpdate {
|
||||
|
||||
///*
|
||||
/// Represents a continuous update from an image generation stream.
|
||||
public struct SdGenerateImagesStreamUpdate {
|
||||
public struct SdGenerateImagesStreamUpdate: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@ -217,7 +217,7 @@ public struct SdGenerateImagesStreamUpdate {
|
||||
|
||||
///*
|
||||
/// An update to the image generation pipeline.
|
||||
public enum OneOf_Update: Equatable {
|
||||
public enum OneOf_Update: Equatable, Sendable {
|
||||
///*
|
||||
/// Batch progress update.
|
||||
case batchProgress(SdGenerateImagesBatchProgressUpdate)
|
||||
@ -225,38 +225,11 @@ public struct SdGenerateImagesStreamUpdate {
|
||||
/// Batch completion update.
|
||||
case batchCompleted(SdGenerateImagesBatchCompletedUpdate)
|
||||
|
||||
#if !swift(>=4.1)
|
||||
public static func ==(lhs: SdGenerateImagesStreamUpdate.OneOf_Update, rhs: SdGenerateImagesStreamUpdate.OneOf_Update) -> Bool {
|
||||
// The use of inline closures is to circumvent an issue where the compiler
|
||||
// allocates stack space for every case branch when no optimizations are
|
||||
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
||||
switch (lhs, rhs) {
|
||||
case (.batchProgress, .batchProgress): return {
|
||||
guard case .batchProgress(let l) = lhs, case .batchProgress(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
case (.batchCompleted, .batchCompleted): return {
|
||||
guard case .batchCompleted(let l) = lhs, case .batchCompleted(let r) = rhs else { preconditionFailure() }
|
||||
return l == r
|
||||
}()
|
||||
default: return false
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public init() {}
|
||||
}
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension SdGenerateImagesRequest: @unchecked Sendable {}
|
||||
extension SdGenerateImagesResponse: @unchecked Sendable {}
|
||||
extension SdGenerateImagesBatchProgressUpdate: @unchecked Sendable {}
|
||||
extension SdGenerateImagesBatchCompletedUpdate: @unchecked Sendable {}
|
||||
extension SdGenerateImagesStreamUpdate: @unchecked Sendable {}
|
||||
extension SdGenerateImagesStreamUpdate.OneOf_Update: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "gay.pizza.stable.diffusion"
|
||||
@ -340,10 +313,10 @@ extension SdGenerateImagesRequest: SwiftProtobuf.Message, SwiftProtobuf._Message
|
||||
if self.scheduler != .pndm {
|
||||
try visitor.visitSingularEnumField(value: self.scheduler, fieldNumber: 10)
|
||||
}
|
||||
if self.guidanceScale != 0 {
|
||||
if self.guidanceScale.bitPattern != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.guidanceScale, fieldNumber: 11)
|
||||
}
|
||||
if self.strength != 0 {
|
||||
if self.strength.bitPattern != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.strength, fieldNumber: 12)
|
||||
}
|
||||
if self.stepCount != 0 {
|
||||
@ -434,7 +407,7 @@ extension SdGenerateImagesBatchProgressUpdate: SwiftProtobuf.Message, SwiftProto
|
||||
}
|
||||
|
||||
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.percentageComplete != 0 {
|
||||
if self.percentageComplete.bitPattern != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.percentageComplete, fieldNumber: 1)
|
||||
}
|
||||
if !self.images.isEmpty {
|
||||
@ -558,7 +531,7 @@ extension SdGenerateImagesStreamUpdate: SwiftProtobuf.Message, SwiftProtobuf._Me
|
||||
}()
|
||||
case nil: break
|
||||
}
|
||||
if self.overallPercentageComplete != 0 {
|
||||
if self.overallPercentageComplete.bitPattern != 0 {
|
||||
try visitor.visitSingularFloatField(value: self.overallPercentageComplete, fieldNumber: 4)
|
||||
}
|
||||
if self.jobID != 0 {
|
||||
|
Reference in New Issue
Block a user