Skip to content

🐛 v3 crashes on iOS and macOS devices due to increasing memory usage #1242

@GaLambert

Description

@GaLambert

System Info

  • transformers.js version: 3.2.2
  • iOS: 18.3.2
  • macOS: 15.3.1
  • Framework: Next.js (14.2.22) and Vite (6.0.5)

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

We've encountered issues with the v3 of transformers.js (specifically v3.2.2, potentially others) on iOS devices and macOS. The application crashes on iOS (both Safari and Chrome), and causes extremely high and growing memory usage (10+GB) on macOS, eventually also crashing.

Tested with the following examples:

Temporary solution: As a workaround, downgrading to @xenova/[email protected] resolves the iOS crashing issue. However, this is not an ideal long-term solution.

We would greatly appreciate any insights or assistance in resolving these issues with the latest version. Thank you! 🙏

Reproduction

  1. Use transformers.js version 3.2.2
  2. Run a model (e.g., YoloV9) on an iOS device (iPhone)
  3. Observe that the application crashes
  4. Run the same model on macOS
  5. Check Activity Monitor and observe memory usage exceeding 10GB+ for Safari

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions