DiffusionEvent

sealed interface DiffusionEvent(source)

Events of one DiffusionEngine.generate collection.

Inheritors

Types

Link copied to clipboard
data class Completed(val image: DiffusionImage) : DiffusionEvent

The finished image. This is the last event.

Link copied to clipboard
data class Error(val exception: InferenceException) : DiffusionEvent

A typed failure. It is terminal: no event follows it and the flow then completes normally.

Link copied to clipboard
data class Progress(val phase: DiffusionPhase, val step: Int, val totalSteps: Int, val secondsPerStep: Float) : DiffusionEvent

Progress of the running generation. step is 0 when a phase starts, then 1..totalSteps after each completed step. Cancellation takes effect at these step boundaries.