Changing background of product picture to create an ad

Are you hard set on using Gemini? Ive done something similar for a side project where I replaced the background of a car using Stability AI. My process was:

  1. Take input image and strip background (Maybe your products already have no background)
  2. Use the structure API to generate a new image using the same structure of the car with a different background
  3. Use n8n Edit Image node to stick the Masked car onto the new image generated.
  4. Push the new image to a cdn for use in my app

Heres the results:



NB: Slightly different images, as I cant find my old execution, but to give an idea of the process

1 Like