Fal.Ai/Flux - image-to-image generation

Describe the problem/error/question

I’m trying to build a wokflow able to generate images using image-to-image (plus prompt) inputs, but keep getting “Error code 422 (invalid request)”. The source images are stored in my own PC, and available for reading through “Read Binary Files” node from my volume “/data/videos/*.{png,jpg,jpeg,webp}”. The workflow works fine until reaching the “Get Result” node.

What is the error message (if any)?

“Your request is invalid or could not be processed by the service

Failed to download the file. Please check if the URL is accessible and try again.”

Please share your workflow

Share the output returned by the last node

“Your request is invalid or could not be processed by the service
Failed to download the file. Please check if the URL is accessible and try again.”

Information on your n8n setup

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

I think this is a similar question ? Or the same?

1 Like

Actually is a similar question. There I was having trouble to generate text-to-image outputs. Now I’m having trouble to generate image-to-image, by using a reference image from my own hard disk. I don’t know if the problem is the URL, the “Move Binary Data – to base64” or something else.

I think your problem is here:

replace this expression with this one:

{{ 
"data:"
  + (($binary.data && $binary.data.mimeType) ? $binary.data.mimeType : 'image/png')
  + ';base64,' 
  + $json.data
}}

also add a loop to check the status..
i’d do it like this

plug this workflow after your read binary file

2 Likes

It woked :smiley:!! It seems I’m lacking some basic knowledge about node parameters :sweat_smile:. If there’s any tutorial or guide material which you would indicate, I’ll gladly accept suggestions. Thank you so much for your help!

1 Like

No worries! :grinning_face_with_smiling_eyes:

I’d start with:

– Text course level 1 + videos beginner level
– Text course level 2 + videos advanced level

These courses are short, straightforward, and focus right on the n8n core, for real!

1 Like

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