react-native-fast-tflite icon indicating copy to clipboard operation
react-native-fast-tflite copied to clipboard

Failed to create TFLite interpreter from model when passing core-ml argument

Open mikecfisher opened this issue 1 year ago • 7 comments

I have a brand new Expo project and I'm trying to load a tflite model via this library. It works fine (but my app slows down too much) without passing the core-ml argument. When I pass core-ml I get this error.

Error loading model: [Error: Failed to create TFLite interpreter from model "http://192.168.68.59:8081/assets/?unstable_path=.%2Fassets%2Fmodels/model_float32.tflite?platform=ios&hash=c85e0013ff22528c158f75ed25a51667"!]

This is running on my local machine via the iOS simulator. Any ideas why this is happening when I pass this option?

Here is my package.json for reference

{
  "name": "my app",
  "main": "expo-router/entry",
  "version": "1.0.0",
  "scripts": {
    "start": "expo start",
    "dev": "APP_VARIANT=development npx expo start",
    "reset-project": "node ./scripts/reset-project.js",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web",
    "test": "jest --watchAll",
    "lint": "eslint .",
    "typecheck": "tsc --noEmit"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/vector-icons": "^14.0.2",
    "@gluestack-ui/button": "^1.0.7",
    "@gluestack-ui/nativewind-utils": "^1.0.25",
    "@gluestack-ui/overlay": "^0.1.15",
    "@gluestack-ui/toast": "^1.0.7",
    "@legendapp/state": "^3.0.0-beta.8",
    "@react-navigation/native": "^6.0.2",
    "@tanstack/react-query": "^5.59.13",
    "babel-plugin-module-resolver": "^5.0.2",
    "expo": "~51.0.28",
    "expo-constants": "~16.0.2",
    "expo-dev-client": "~4.0.28",
    "expo-file-system": "~17.0.1",
    "expo-font": "~12.0.9",
    "expo-linking": "~6.3.1",
    "expo-router": "~3.5.23",
    "expo-splash-screen": "~0.27.5",
    "expo-status-bar": "~1.12.1",
    "expo-system-ui": "~3.0.7",
    "expo-updates": "~0.25.27",
    "expo-web-browser": "~13.0.3",
    "nativewind": "4.0.36",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.74.5",
    "react-native-fast-tflite": "^1.4.0",
    "react-native-gesture-handler": "~2.16.1",
    "react-native-mmkv": "2.12.2",
    "react-native-reanimated": "~3.10.1",
    "react-native-safe-area-context": "4.10.5",
    "react-native-screens": "3.31.1",
    "react-native-svg": "^13.4.0",
    "react-native-web": "~0.19.10",
    "tailwindcss": "^3.4.13",
    "expo-asset": "~10.0.10",
    "expo-image-manipulator": "~12.0.5"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@eslint/js": "^9.12.0",
    "@tanstack/eslint-plugin-query": "^5.59.7",
    "@types/jest": "^29.5.12",
    "@types/react": "~18.2.45",
    "@types/react-test-renderer": "^18.0.7",
    "@typescript-eslint/eslint-plugin": "^8.9.0",
    "@typescript-eslint/parser": "^8.9.0",
    "eslint": "^8.57.1",
    "eslint-config-universe": "^13.0.0",
    "eslint-plugin-import": "^2.31.0",
    "eslint-plugin-react": "^7.37.1",
    "eslint-plugin-react-hooks": "^5.0.0",
    "globals": "^15.11.0",
    "jest": "^29.2.1",
    "jest-expo": "~51.0.3",
    "jscodeshift": "^0.15.2",
    "prettier": "^3.3.3",
    "prettier-plugin-tailwindcss": "^0.6.8",
    "react-test-renderer": "18.2.0",
    "typescript": "~5.3.3",
    "typescript-eslint": "^8.9.0"
  },
  "private": true
}

mikecfisher avatar Oct 16 '24 03:10 mikecfisher