createStyleTransfer(
config,runtime?):Promise<StyleTransfer>
Defined in: extensions/cv/tasks/styleTransfer.ts:93
Creates an image style transfer runner for executing local style transfer models.
It validates the model inputs and outputs requirements, pre-allocates the necessary static execution tensors, sets up an image preprocessor, and registers clean disposal hooks to clear all native memory.
Style transfer task configuration containing path and options. See StyleTransferModel.
WorkletRuntime
Optional worklet runtime thread on which to run the model execution.
Promise<StyleTransfer>
A promise resolving to the instantiated StyleTransfer runner.
With code LOAD_FAILED if model fails to load,
or SCHEMA_MISMATCH if model schema does not match style transfer spec.