-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
System Info
Browser and all environments that support WebGPU.
Environment/Platform
- Website/web-app
- Browser extension
- Server-side (e.g., Node.js, Deno, Bun)
- Desktop app (e.g., Electron)
- Other (e.g., VSCode extension)
Description
Due to a bug in onnxruntime, after we dispose a pipeline or a model the WebGPU is destroyed, but the JavaScript reference in env.webgpu.device is never cleared, leaving a stale reference to a destroyed device.
This means next time it tries create a WebGOU session, it tries to access the destroyed WebGPU device and fails.
Reproduction
-
install Transformers.js v4
npm i @huggingface/transformers@next -
create a pipeline with webgpu:
const pipe = await pipeline(
"feature-extraction",
"onnx-community/all-MiniLM-L6-v2-ONNX",
{
device: "webgpu",
}
);- destroy the pipeline
pipe.dispose();- create a new pipeline with webgpu:
const pipe2 = await pipeline(
"feature-extraction",
"onnx-community/all-MiniLM-L6-v2-ONNX",
{
device: "webgpu",
}
);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working