Implement the ability to optionally collect intermediate images.

This commit is contained in:
2023-04-23 14:50:45 -07:00
parent d24d299a7d
commit 5704654d1a
6 changed files with 91 additions and 15 deletions

View File

@ -327,7 +327,8 @@ extension SdImageGenerationServiceClientProtocol {
)
}
/// Server streaming call to GenerateImagesStreaming
///*
/// Generates images using a loaded model, providing updates along the way.
///
/// - Parameters:
/// - request: Request to send to GenerateImagesStreaming.
@ -713,6 +714,8 @@ public protocol SdImageGenerationServiceProvider: CallHandlerProvider {
/// Generates images using a loaded model.
func generateImages(request: SdGenerateImagesRequest, context: StatusOnlyCallContext) -> EventLoopFuture<SdGenerateImagesResponse>
///*
/// Generates images using a loaded model, providing updates along the way.
func generateImagesStreaming(request: SdGenerateImagesRequest, context: StreamingResponseCallContext<SdGenerateImagesStreamUpdate>) -> EventLoopFuture<GRPCStatus>
}
@ -770,6 +773,8 @@ public protocol SdImageGenerationServiceAsyncProvider: CallHandlerProvider {
context: GRPCAsyncServerCallContext
) async throws -> SdGenerateImagesResponse
///*
/// Generates images using a loaded model, providing updates along the way.
@Sendable func generateImagesStreaming(
request: SdGenerateImagesRequest,
responseStream: GRPCAsyncResponseStreamWriter<SdGenerateImagesStreamUpdate>,