UNPKG

latentimg

Version:

Lightweight browser-side encoder/decoder for images using ONNX

8 lines (7 loc) 340 B
import { getOrt } from "./init"; type Ort = ReturnType<typeof getOrt>; type Tensor = InstanceType<Ort["Tensor"]>; export declare function imageToTensor(dataUrl: string): Promise<Tensor>; export declare function tensorToImage(tensor: Tensor): Promise<string>; export declare function tensorToLatent(tensor: Tensor): Float32Array; export {};