Skip to content

PoseLandmarker throws error on GPU-less environments (e.g., M1 MacBook Air) #5970

@arlo-engineer

Description

@arlo-engineer

Have I written custom code (as opposed to using a stock example script provided in MediaPipe)

Yes

OS Platform and Distribution

macOS Sequoia 15.4.1 on M1 MacBook Air (no discrete GPU)

Mobile device if the issue happens on mobile device

No response

Browser and version if the issue happens on browser

Google Chrome 136.0.7103.114

Programming Language and version

TypeScript (with Next.js 15.3.1)

MediaPipe version

0.10.0

Bazel version

No response

Solution

Pose

Android Studio, NDK, SDK versions (if issue is related to building in Android environment)

No response

Xcode & Tulsi version (if issue is related to building for iOS)

No response

Describe the actual behavior

When trying to initialize PoseLandmarker in a Next.js project, I encounter the following error on an M1 MacBook Air (which does not have a discrete GPU), regardless of whether I set delegate to "CPU" or "GPU":

Failed to initialize pose landmarker: Error: StartGraph failed: $Service "kGpuService", required by node mediapipe_tasks_vision_pose_landmarker_poselandmarkergraph__mediapipe_tasks_vision_pose_detector_posedetectorgraph__mediapipe_tasks_components_processors_imagepreprocessinggraph__ImageCloneCalculator, was not provided and cannot be created: emscripten_webgl_create_context() returned error 0; StartRun failed

Describe the expected behaviour

MediaPipe Pose should work correctly on devices without a GPU (e.g., M1 MacBook Air), regardless of the backend used.

Standalone code/steps you may have used to try to get what you need

You can reproduce the issue by cloning the following minimal repository:
👉 https://github.com/arlo-engineer/mediapipe-pose-study

Setup instructions

  1. Clone the repository

    git clone https://github.com/arlo-engineer/mediapipe-pose-study.git
    cd mediapipe-pose-study
  2. Install dependenciews

    npm install
  3. Run the development server

    npm run dev
  4. Open your browser and navigate to:
    http://localhost:3000/pose

Environment

  • Node.js: v23.9.0
  • npm: v10.9.2

Other info / Complete Logs

  • The error appears to be WebGL-related.
  • It happens both when setting delegate: "CPU" and delegate: "GPU".
  • Not sure if this is a bug or an unsupported environment.
  • I couldn’t find documentation that explicitly states whether GPU-less environments are unsupported.
  • Confirmed that the PoseLandmarker works correctly on a GPU-equipped M4 MacBook Pro environment.

Metadata

Metadata

Assignees

Labels

gpuMediaPipe GPU related issuesos:macOSIssues on MacOSplatform:javascriptMediaPipe Javascript issuestype:bugBug in the Source Code of MediaPipe Solution

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions