warmup
Warms up an Upscaler instance. For more info, see the guide on warming up.
Example
[object Object]
Defined in upscaler.ts:174Parameters
- warmupSizes:
WarmupSizes
- Denotes how to warm the model up. - options?: - A set of warm up arguments.
- signal?:
AbortSignal
- Provides a mechanism to abort the warmup process. For more, see the guides on cancelling requests. - awaitNextFrame?:
boolean
- If provided, upscaler will awaittf.nextFrame()
on each cycle. This can be helpful if you need to release for the UI thread or wish to be more responsive to abort signals.
- signal?:
WarmupSizes
[number, number]
- an array of two numbers representing width and height.{patchSize: number; padding?: number}
- an object with thepatchSize
and optionalpadding
properties.[number, number][]
- an array of arrays of two numbers representing width and height.{patchSize: number; padding?: number}[]
- an array of objects with thepatchSize
and optionalpadding
properties.
Returns
Promise<void>