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:
- Take input image and strip background (Maybe your products already have no background)
- Use the structure API to generate a new image using the same structure of the car with a different background
- Use n8n Edit Image node to stick the Masked car onto the new image generated.
- 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