Skip to main content

//clika-runtime/io.clika.modelverse/VideoGenerationModel

VideoGenerationModel

[common]
class VideoGenerationModel : PreTrainedModel

A video-generation model: a prompt in, a clip out (the text-to-video kind), its frames each as the RGBA pixels an Android bitmap takes, with the clip's sound where the family answers one.

Open it with open from a checkpoint the model library's video-generation families claim (a family that declares a clip out of text). Hand it a prompt with generate; the clip arrives through the listener on the model's own worker thread, one request at a time per model. close frees the weights.

Types​

NameSummary
Companion[common]
object Companion

Properties​

NameSummary
capabilities[common]
val capabilities: Capabilities
What the model takes and gives, read when it opened: Capabilities.defaultImageWidth, Capabilities.defaultImageHeight, Capabilities.defaultFrames and Capabilities.defaultFps are what a request of zeros takes.
config[common]
open override val config: PretrainedConfig
The checkpoint's identity, read when the model opened.

Functions​

NameSummary
close[common]
open fun close()
Free the model. A running request is canceled first and the call waits for it to return; called from inside a listener callback, the free runs right after that callback's request ends instead. Idempotent.
generate[common]
fun generate(prompt: String, options: VideoGenerationOptions = VideoGenerationOptions(), listener: VideoGenerationListener): VideoGenerationHandle
Generate a clip for prompt under options. Returns at once; the worker runs the request and calls listener on its thread: VideoGenerationListener.onVideo with the clip and the seed the model drew, then VideoGenerationListener.onDone with the VideoGenerationReport. A knob left at its zero keeps the model's own default; the family's laws on the frame count and the size apply.
residency[common]
open override fun residency(): ResidencyReport
What the model holds on each device right now (ResidencyReport); a closed model refuses with ModelverseException.