runtime

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package runtime provides common types and interfaces that all Stable Diffusion runtimes share.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runtime

type Runtime interface {
	// ListModels lists all available Stable Diffusion models.
	ListModels(ctx context.Context) ([]types.ModelInfo, error)

	// ListSamplers lists all available samplers.
	ListSamplers(ctx context.Context) ([]types.SamplerInfo, error)

	// TextToImage generates an image from a text prompt.
	TextToImage(ctx context.Context, params types.TextToImageParams) (image.Image, error)

	// TextToImagePNG generates an image from a text prompt and encodes it as a PNG.
	// Encoded image preserves any associated image metadata.
	TextToImagePNG(ctx context.Context, params types.TextToImageParams) (io.ReadCloser, error)

	// Close the runtime and free associated resources.
	Close()
}

Runtime is an interface for Stable Diffusion runtimes.

Directories

Path Synopsis
Package auto implements Automatic1111 Stable Diffusion WebUI client.
Package auto implements Automatic1111 Stable Diffusion WebUI client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL