Ministral-3-3B-Instruct-2512-ONNX does not work on Electron
Author: abdullah-cod9
Pull request: no

I'm trying to run **mistralai/Ministral-3-3B-Instruct-2512-ONNX** on Electron, but I'm getting the following error:

`An error occurred during model execution: "Error: invalid data location: undefined for input "input_ids"".`

` Inputs given to model: 
Object
input_ids
: 
{type: 'int64', dims: Array(2), location: undefined, data: BigInt64Array(827)}
`

I followed the demo here: https://huggingface.co/spaces/mistralai/Ministral_3B_WebGPU


`export async function inferenceVision({
  canvasRef,
  inferenceLock,
  visionModelRef,
  processorRef,
  prompt,
  video,
  onStatsUpdate,
  onTextUpdate
}: Props): Promise<string> {
  if (inferenceLock.current) {
    console.log('Inference already running, skipping frame')
    return '' // Return empty string to signal a skip
  }
  inferenceLock.current = true
  if (!processorRef.current || !visionModelRef.current) {
    throw new Error('Model/processor not loaded')
  }
  if (!canvasRef.current) {
    canvasRef.current = document.createElement('canvas')
  }
  const canvas = canvasRef.current
  canvas.width = video.videoWidth
  canvas.height = video.videoHeight
  const ctx = canvas.getContext('2d', { willReadFrequently: true })
  if (!ctx) throw new Error('Could not get canvas context')

  ctx.drawImage(video, 0, 0)

  const frame = ctx.getImageData(0, 0, canvas.width, canvas.height)
  const rawImg = new RawImage(frame.data, frame.width, frame.height, 4)
  console.log(prompt)

  const messages: Message[] = [
    {
      role: 'system',
      content: `You are a helpful visual AI assistant. Respond concisely and accurately to the user's query in one sentence.`
    },
    { role: 'user', content: `[IMG]${prompt}` }
  ]

  const _messages = processorRef.current.apply_chat_template(messages)
  console.log(rawImg, _messages)

  const inputs = await processorRef.current(rawImg, _messages, {
    add_special_tokens: false
  })
  console.log(inputs)

  let streamed = ''
  const start = performance.now()
  let decodeStart: number | undefined
  let numTokens = 0
  const streamer = new TextStreamer(processorRef.current.tokenizer!, {
    skip_prompt: true,
    skip_special_tokens: true,
    callback_function: (t: string) => {
      if (streamed.length === 0) {
        const latency = performance.now() - start
        onStatsUpdate?.({ ttft: latency })
      }
      streamed += t
      onTextUpdate?.(streamed.trim())
    },
    token_callback_function: () => {
      decodeStart ??= performance.now()
      numTokens++
      const elapsed = (performance.now() - decodeStart) / 1000
      if (elapsed > 0) {
        onStatsUpdate?.({ tps: numTokens / elapsed })
      }
    }
  })
  const outputs = (await visionModelRef.current.generate({
    ...inputs,
    max_new_tokens: 512,
    do_sample: false,
    streamer,
    repetition_penalty: 1.2
  })) as Tensor
  const generated = outputs.slice(null, [inputs.input_ids.dims.at(-1), null])
  const decodeEnd = performance.now()
  if (decodeStart) {
    const numTokens = generated.dims[1]
    const tps = numTokens / ((decodeEnd - decodeStart) / 1000)
    onStatsUpdate?.({ tps })
  }

  const decoded = processorRef.current.batch_decode(generated, {
    skip_special_tokens: true
  })
  inferenceLock.current = false
  return decoded[0].trim()
}`

Comments:
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.