LocalDiffusionImpl

internal class LocalDiffusionImpl(val uNet: UNet, val tokenizer: LocalDiffusionTextTokenizer, val ortEnvironmentProvider: OrtEnvironmentProvider) : LocalDiffusion(source)

Implements LocalDiffusion behavior in the SDAI ONNX local diffusion feature layer.

Author

Dmitriy Moroz

Constructors

Link copied to clipboard
constructor(uNet: UNet, tokenizer: LocalDiffusionTextTokenizer, ortEnvironmentProvider: OrtEnvironmentProvider)

Properties

Link copied to clipboard

Exposes the ortEnvironmentProvider value used by the SDAI ONNX local diffusion feature layer.

Link copied to clipboard
private val statusFlow: MutableSharedFlow<LocalDiffusionStatus>

Exposes the statusFlow value used by the SDAI ONNX local diffusion feature layer.

Link copied to clipboard

Exposes the tokenizer value used by the SDAI ONNX local diffusion feature layer.

Link copied to clipboard
private val uNet: UNet

Exposes the uNet value used by the SDAI ONNX local diffusion feature layer.

Functions

Link copied to clipboard
open suspend override fun interrupt()

Performs the SDAI side effect handled by interrupt.

Link copied to clipboard
private fun interruptGeneration()

Performs the SDAI side effect handled by interruptGeneration.

Link copied to clipboard
open override fun observeStatus(): SharedFlow<LocalDiffusionStatus>

Loads SDAI data through observeStatus.

Link copied to clipboard
open suspend override fun process(payload: TextToImagePayload): Bitmap

Executes the process step in the SDAI ONNX local diffusion feature layer.