WebNN support initial
This commit is contained in:
@@ -24,6 +24,7 @@ interface ModelPickerProps {
|
||||
const DEVICE_OPTIONS: readonly { value: DevicePreference; label: string }[] = [
|
||||
{ value: "auto", label: "Auto (WebGPU if available)" },
|
||||
{ value: "webgpu", label: "WebGPU" },
|
||||
{ value: "webnn", label: "WebNN" },
|
||||
{ value: "wasm", label: "WASM (CPU)" },
|
||||
];
|
||||
|
||||
@@ -47,7 +48,12 @@ export function ModelPicker({
|
||||
// the device. Until the worker has reported one, assume WASM unless the
|
||||
// user explicitly asked for WebGPU.
|
||||
const estimateDevice: InferenceDevice =
|
||||
activeDevice ?? (devicePreference === "webgpu" ? "webgpu" : "wasm");
|
||||
activeDevice ??
|
||||
(devicePreference === "webgpu"
|
||||
? "webgpu"
|
||||
: devicePreference === "webnn"
|
||||
? "webnn"
|
||||
: "wasm");
|
||||
|
||||
const groups: { title: string; items: WhisperModel[] }[] = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user