github software-mansion/react-native-executorch v0.8.0

6 hours ago

React Native ExecuTorch v0.8.0 👁️ ⚛️

This is the biggest and the most exciting release for us so far! If you're looking for processing camera input with AI models, running VLMs, or Bare RN support, look no more 👇

What's new?

Computer Vision

  • VisionCamera integration: All computer vision hooks now expose a runOnFrame worklet for real-time camera frame processing via VisionCamera v5 docs
  • Instance Segmentation: New useInstanceSegmentation hook for per-pixel object masks, supporting YOLO (nano/small/medium/large/extra-large) and RF-DETR models docs
  • Object Detection: Added YOLO and RF-DETR model support docs
  • Semantic Segmentation: Added support for DeepLab V3, LRASPP, FCN, and Selfie Segmentation models docs
  • Quantized CV models: Added quantized variants for CLIP, Style Transfer, EfficientNetV2, and SSDLite
  • Custom model support for Object Detection & Instance / Semantic Segmentation: Both modules are now generic — you can plug in your own model via fromCustomModel() as long as it conforms to the expected input/output contract (see respective docs for further guidance)

VLMs

  • Vision Language Models (VLMs): useLLM now supports multimodal models — pass capabilities: ['vision'] and send images alongside messages docs
  • Added support for Liquid Foundation Models vision-language model (LFM2_VL_1_6B_QUANTIZED).

LLMs

  • LFM-2.5 support: Added support for Liquid Foundation Model 2.5 Instruct docs
  • LLM context management: Added ContextStrategy to ChatConfig — configure naive, message-count-based, or sliding window context truncation. SlidingWindowContextStrategy is now the default
    docs

Audio

  • Whisper is now up to 3x faster
  • TTS + LLM integration: Text-to-Speech streaming now accepts incrementally expanded text input, enabling real-time speech synthesis piped directly from a running LLM docs
  • Kokoro TTS pre-computed phonemes: New forwardFromPhonemes / streamFromPhonemes APIs let you bypass the built-in G2P pipeline and supply your own IPA phoneme strings docs
  • Speech-to-Text timestamps: transcribe and stream now return TranscriptionResult objects with word-level timestamps docs

General

  • Bare React Native support: The library now officially supports bare React Native projects via react-native-executorch-bare-resource-fetcher docs
  • Modular resource fetcher adapters: Platform-specific adapters (react-native-executorch-expo-resource-fetcher, react-native-executorch-bare-resource-fetcher) replace the previous monolithic fetcher, requiring explicit initialization via initExecutorch()
    docs
  • Uniform module factory API: All modules now expose fromModelName() and fromCustomModel() static factories, replacing the old new Module() + load() pattern

Breaking changes ⚠️

  • initExecutorch() with an explicit adapter is now required before using any hook. Install react-native-executorch-expo-resource-fetcher or react-native-executorch-bare-resource-fetcher depending on your project type
    docs
  • All modules now use static factory methods (Module.fromModelName() / Module.fromCustomModel()) — the old new Module() constructor + .load() pattern is removed
  • ImageSegmentation has been renamed to SemanticSegmentation — update imports and hook names accordingly (useSemanticSegmentation) docs
  • Semantic segmentation resize parameter renamed to resizeToInput
  • Semantic segmentation forward() return type changed — now returns Record<'ARGMAX', Int32Array> & Record<K, Float32Array> instead of number[]
  • ObjectDetection.forward() now accepts an ObjectDetectionOptions object for filtering classes of interest
  • Classification.forward() return type changed — now returns a type-safe record of label names to scores instead of Record<string, number>
  • StyleTransfer.forward signature changed — now accepts string | PixelData and returns Promise<PixelData | string> depending on the output parameter docs
  • Speech-to-Text: transcribe and stream now return TranscriptionResult (not raw strings). stream is now an async generator. The committed/nonCommitted hook properties have been removed
    docs
  • TTS streaming API changed — TextToSpeechStreamingCallbacks pattern replaced by streamInsert() / streamStop() methods, and stream() is now an async generator docs
  • LLM ChatConfig: contextWindowLength has been replaced by contextStrategy

Don't miss a new react-native-executorch release

NewReleases is sending notifications on new releases.