export declare enum Quality { TINY = "TINY", LOW = "LOW", MEDIUM = "MEDIUM", HIGH = "HIGH", ULTRA = "ULTRA" } export declare enum BlurStrength { WEAK = "WEAK", MODERATE = "MODERATE", STRONG = "STRONG", STRONGER = "STRONGER", STRONGEST = "STRONGEST" } export type ResolutionConfig = { readonly height: number; readonly width: number; }; export interface SizeConfig { readonly inputSize: ResolutionConfig; readonly outputSize: ResolutionConfig; readonly upscaleSize: ResolutionConfig; } export interface ModelQualityConfig { readonly modelFile: string; readonly modelRank: number; readonly generationIntervalMs: number; readonly inputSize: ResolutionConfig; readonly outputSize: ResolutionConfig; readonly upscaleSize: ResolutionConfig; } export type InputConfig = ResolutionConfig; export type AssetUrlResolver = (assetUri: string, config: PreloadConfig) => Promise; export interface RenderConfig { readonly type: 'blur' | 'passthrough' | 'replacement'; readonly horizontalMirror?: boolean; } export interface BlurConfig extends RenderConfig { readonly type: 'blur'; readonly kernelSize: number; readonly sigma: number; } export interface ReplacementConfig extends RenderConfig { readonly background: HTMLCanvasElement | HTMLVideoElement; readonly type: 'replacement'; readonly static: boolean; readonly horizontalMirror?: boolean; } export interface PassthroughConfig extends RenderConfig { readonly type: 'passthrough'; } export type Generator = 'worker'; export type BaseMaskConfig = { readonly generator: Generator; readonly generationIntervalMs: number; readonly modelRank: number; readonly modelUri: string; readonly workerUri: string; readonly inputSize?: ResolutionConfig; readonly outputSize?: ResolutionConfig; readonly upscaleSize?: ResolutionConfig; }; export type MaskConfig = BaseMaskConfig & SizeConfig; export type PreloadConfig = { readonly baseUrl?: string; readonly wasmUri: string; readonly mask: BaseMaskConfig; readonly executionProviders?: string[]; readonly assetUrlResolver?: AssetUrlResolver; }; export type WorkerConfig = Omit; export type PipelineConfig = PreloadConfig & { readonly render: BlurConfig | RenderConfig | ReplacementConfig; readonly input: InputConfig; readonly mask: MaskConfig; }; export interface RawConfig { readonly baseUrls: { readonly int: string; readonly prod: string; }; readonly basePaths: { readonly models: string; readonly wasm: string; readonly workers: string; }; readonly blurStrengths: { readonly [key in Lowercase]: { readonly kernelSize: number; readonly sigma: number; }; }; readonly modelQualities: { readonly [key in Lowercase]: ModelQualityConfig; }; readonly onnxVersion: string; readonly modelVersion: string; readonly workerFile: string; readonly modelUrlTemplate: string; readonly wasmPathTemplate: string; readonly workerUrlTemplate: string; }