Skip to content

fix(deps): specify Swift package versions#45

Open
nekomeowww wants to merge 1 commit into
apple:mainfrom
nekomeowww:dev/specify-package-version
Open

fix(deps): specify Swift package versions#45
nekomeowww wants to merge 1 commit into
apple:mainfrom
nekomeowww:dev/specify-package-version

Conversation

@nekomeowww

Copy link
Copy Markdown

Close #35

Borrowed from #39, thanks for the correct version @wytalfred provided.

Context

The following error occurs:

  • apple/ml-fastvlm/app/FastVLM/FastVLM.swift:219:36 Cannot convert value of type 'MLXFast.ScaledDotProductAttentionMaskMode' to expected argument type 'MLXArray'
    public func callAsFunction(
            _ inputs: MLXArray?, cache: [KVCache]? = nil, inputEmbedding: MLXArray? = nil
        ) -> MLXArray {
            for (i, layer) in layers.enumerated() {
                h = layer(h, mask: mask, cache: cache?[i]) // <--
            }
        }

apple/ml-fastvlm/app/FastVLM/FastVLM.swift:364:31 Value of type 'UserInput.Prompt' has no member 'asMessages':

    public func prepare(prompt: UserInput.Prompt, imageTHW: THW?) -> String {
        var messages = prompt.asMessages() // <--
    }

apple/ml-fastvlm/app/FastVLM/FastVLM.swift:414:74 Extra argument 'imageGridThw' in call:

    public func prepare(input: UserInput) throws -> LMInput {
        let prompt = prepare(prompt: input.prompt, imageTHW: thw) // <--
    }

apple/ml-fastvlm/app/FastVLM/FastVLM.swift:540:36 Value of type 'LMInput.ProcessedImage' has no member 'imageGridThw':

    public func prepare(_ input: LMInput, cache: [any KVCache], windowSize: Int?) throws
        -> PrepareResult
    {
        let gridThw = input.image?.imageGridThw // <--
    }

Co-authored-by: Alfred <5847843+wytalfred@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Value of type 'UserInput.Prompt' has no member 'asMessages'

1 participant