Heads-up: nothing in React-Native 0.73 broke your model – the change is inside
react-native-fast-tflite itself.
Starting with v1.4.0 the author stopped bundling the huge, “everything-inside” TensorFlow-Lite binary and now ships only the slim core interpreter.
If your model needs an operator that is no longer in the core build, the native
code throws exactly the message you’re seeing:
E/TFLITE : Failed to create TFLite interpreter from model <-- your error
Why did 1.2.1 work?
• 1.2.1 contained the fat AAR that had all kernels + Flex/Select-TF-Ops + GPU.
• 1.6.1 contains only the minimal tensorflow-lite AAR.
If your .tflite graph still has (for example) Flex***, SelectTfOps or any
op that lives in the GPU delegate, the interpreter cannot be created anymore.
––––––––––––––––––––
Fix (Android)
––––––––––––––––––––
- Open
android/app/build.gradle (or the module where you added RN-FTL).
- Add whichever extra binary your model needs:
dependencies {
// core interpreter (already brought in transitively, but we keep it explicit)
implementation("org.tensorflow:tensorflow-lite:2.14.0")
// Your model still has “Flex” / “Select Tf Ops”
implementation("org.tensorflow:tensorflow-lite-select-tf-ops:2.14.0")
// If you really run it on the GPU
// implementation("org.tensorflow:tensorflow-lite-gpu:2.14.0")
}
./gradlew clean, re-build the app, run on a real ARM device
(x86 libs were also removed, so emulators won’t work).
––––––––––––––––––––
Fix (iOS)
––––––––––––––––––––
In your ios/Podfile add the same extra pod and reinstall:
pod 'TensorFlowLiteSelectTfOps', '2.14.0' # or TensorFlowLiteGpu
Then:
cd ios && pod install --repo-update
––––––––––––––––––––
How do I know which binary I need?
––––––––––––––––––––
• Open the model in Netron.
• If you see any layer that begins with Flex, Select, or is not in the
“builtin” operator list, you need tensorflow-lite-select-tf-ops.
• Want GPU? you obviously need the GPU delegate library.
––––––––––––––––––––
Alternative (quick & dirty)
––––––––––––––––––––
If you don’t want to touch Gradle/Pods right now, just pin the package back to
the old version that already contains everything:
npm i react-native-fast-tflite@1.2.1 # or 1.3.0 (last fat AAR)
Expect your APK/IPA to be ~25-30 MB larger.
––––––––––––––––––––
TL;DR
––––––––––––––––––––
The error is not about React-Native, but missing native TensorFlow-Lite
kernels that were dropped in 1.4+.
Add the required tensorflow-lite-* artifacts (or lock the lib to 1.2.x) and
the model will load again. 🚀
Ping me back with logcat / Xcode output if you still hit problems – the line
before “Failed to create interpreter” usually tells exactly which op is
missing.