Skip to content

v1.5.0 - Multimodal Vision Support

Pre-release
Pre-release

Choose a tag to compare

@Bentlybro Bentlybro released this 03 Apr 10:43

📸 Image Input Support

Gemma 4 is a multimodal model — now Spark can actually use it.

New features:

  • Attachment button (paperclip) in the chat input with dropdown: Take Photo or Choose from Gallery
  • Image thumbnails shown in the input area before sending, with X to remove
  • Images displayed in chat bubbles — single images get full width, multiple show in a scrollable row
  • LiteRT-LM native multimodal — images sent as Content.ImageBytes alongside text, using the model's actual vision capabilities
  • Graceful fallback — models that don't support images (MediaPipe) just get the text, images are silently ignored
  • Images persisted — saved to internal storage with chat messages, survive app restart

Technical:

  • ChatMessage now has attachments: List<MessageAttachment>
  • InferenceEngine interface extended with supportsImages() and image-aware generate methods
  • Camera permission added to manifest
  • FileProvider configured for camera temp files

Send a photo to Gemma 4 and ask "what's in this image?" — it works.