Fix compatibility with MLX-Swift-Examples v2.25.7 #59
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: true
parameter tocreateAttentionMask()
MLXArray
from the returnedAttentionMask
enumMLXArray?
instead ofAttentionMask
to layer functions3. FastVLMProcessor - Message Handling Improvements
Before:
After:
Key Changes:
String
casting4. Image Token Processing
Before:
After:
Key Changes:
String(repeating:count:)
5. LMInput.ProcessedImage API Update
Before:
After:
Key Changes:
imageGridThw
toframes
Impact
Testing Status