VaeDecoder

internal class VaeDecoder(val ortEnvironmentProvider: OrtEnvironmentProvider, val fileProviderDescriptor: FileProviderDescriptor, val localModelIdProvider: LocalModelIdProvider, val preferenceManager: PreferenceManager, val deviceId: Int)(source)

Coordinates VaeDecoder behavior in the SDAI ONNX local diffusion feature layer.

Author

Dmitriy Moroz

Constructors

Link copied to clipboard
constructor(ortEnvironmentProvider: OrtEnvironmentProvider, fileProviderDescriptor: FileProviderDescriptor, localModelIdProvider: LocalModelIdProvider, preferenceManager: PreferenceManager, deviceId: Int)

Properties

Link copied to clipboard
private val deviceId: Int

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
private var session: OrtSession?

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

Functions

Link copied to clipboard
private fun clamp(value: Double, min: Double = 0.0, max: Double = 1.0): Double

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

Link copied to clipboard
fun close()

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

Link copied to clipboard
fun convertToImage(output: Array3D<FloatArray>, width: Int, height: Int): Bitmap

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

Link copied to clipboard
fun decode(input: Map<String?, OnnxTensor?>?): Any

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

Link copied to clipboard
private fun initialize()

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