Automatically Passthrough Binary Images strange behavior?

Describe the problem/error/question

I have two problems with Passthrough Binary Images.

  1. The images are passed one at a time so the Agent runs three times when three images are present.
  2. The first image is passed in each of the three iterations.

What I was expecting is all three images being passed to the model with the ability to ask about all of them in a single prompt.

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.78.1
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting: default
  • Running n8n via: Docker
  • Operating system: Unraid Server 7.0
1 Like

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

You are using the wrong model

Try models/gemini-2.0-flash or something higher

I tried 2.0-flash and 2.0-pro.

I don’t’ think the model choice has anything to do with the way n8n is sending 3 separate requests instead of one.

Figured out on my own yet again. :grinning:
The LLM now sees three images all at once instead of the first one three times. :muscle:

Sharing for future searchers.

This Code Node is the key.

// Prep Binaries for Single LLM Call
return [
  {
    binary: Object.fromEntries(
      $input.all().map((item, index) => [`data_${index}`, item.binary.data])
    ),
  },
];

Cheers :beers:

2 Likes

@GollyJer Thank you for the Code Node, I was encountering something similar. :raised_hands:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.