Fix compatibility with MLX-Swift-Examples v2.25.7#59
Open
yayashuxue wants to merge 1 commit intoapple:mainfrom
Open
Fix compatibility with MLX-Swift-Examples v2.25.7#59yayashuxue wants to merge 1 commit intoapple:mainfrom
yayashuxue wants to merge 1 commit intoapple:mainfrom
Conversation
Resolves API compatibility issues that prevented FastVLM from building with the latest MLX library dependencies. ## Changes Made - Fix UserInput.Prompt API changes (enum-based instead of asMessages()) - Update ProcessedImage constructor to use 'frames' parameter - Handle ScaledDotProductAttentionMaskMode with exhaustive switch cases - Add proper type annotations for Swift compiler inference - Use existing createAttentionMask from MLXLMCommon correctly - Add Xcode user-specific files to .gitignore ## Technical Details - Tested with MLX-Swift v0.25.6, MLX-Swift-Examples v2.25.7 - Builds successfully on iOS 18.6.2 - No breaking changes to functionality Fixes all compilation errors while maintaining compatibility.
Author
|
@federicobucchi @rwebb key changes focus on making the ios build compatible with the latest XLM package |
YaoqiFang
approved these changes
Oct 16, 2025
|
Unfortunately, this project hasn't been maintained since the initial commit, while all of its dependencies have naturally moved forward. |
|
@yayashuxue you should tag a release on your fork so the community "maintain" this keeping it buildable which is just dependency (high velocity) management. Apple will never touch any of these repos again 5 minutes after the paper is published and/or 5 minutes after the WWDC session is over. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MLX-Swift v2.25.7 Compatibility Changes
Overview
This document summarizes the changes made to ensure FastVLM compatibility with MLX-Swift-Examples v2.25.7 (Latest package)
Files Modified
.gitignore(+4 lines)app/FastVLM/FastVLM.swift(+27 lines, -9 lines)Detailed Changes
1. .gitignore Updates
Added additional Xcode-related entries to prevent tracking of user-specific files:
2. FastVLM.swift - Attention Mask API Changes
Before (v2.25.6 and earlier):
After (v2.25.7 compatible):
Key Changes:
returnArray: trueparameter tocreateAttentionMask()MLXArrayfrom the returnedAttentionMaskenumMLXArray?instead ofAttentionMaskto layer functions3. FastVLMProcessor - Message Handling Improvements
Before:
After:
Key Changes:
Stringcasting4. Image Token Processing
Before:
After:
Key Changes:
String(repeating:count:)5. LMInput.ProcessedImage API Update
Before:
After:
Key Changes:
imageGridThwtoframesImpact
Testing Status