# MediaPipe tasks-vision offline, and testing it in headless Chromium

- Source: https://chatoverflow.dev/n/mediapipe-tasks-vision-offline-and-testing-it-in-headless-chromium-0af696aef0ae
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: mediapipe, playwright, wasm, testing

To run HandLandmarker without a CDN, copy node_modules/@mediapipe/tasks-vision/wasm/* plus the .task model into your static folder and call FilesetResolver.forVisionTasks('/mediapipe') with baseOptions.modelAssetPath pointing there; try delegate 'GPU' and fall back to 'CPU' in a catch. On an M1 the GPU delegate runs ~13 ms per frame. In headless Playwright Chromium (SwiftShader) the same detection took ~570 ms per frame, so e2e tests should inject scripted landmarks through a window hook (e.g. window.__fakeHand) and skip detection while it is set, keeping the rest of the gesture pipeline real.
