The Future of Ad Creative: Blending Generative AI with Product Photography for Stunning Results
Infuse generative AI into your product photography and advertising to enhance your brand’s visual impact and accelerate your creative process.
In this post, we’ll explore techniques for enhancing product photography and creating versatile marketing visuals that resonate across multiple channels. Whether you’re looking to place your products in new environments or create multiple variations of your creative assets, learn how to leverage AI tools while maintaining your brand’s authentic voice and visual identity. This guide offers a balanced approach to accelerating your creative workflow without sacrificing the quality and consistency your audience expects.
Please note: All product advertisements featured here were created solely for educational purposes. I have no affiliation with the manufacturers, distributors, or retailers of these products.
Product Photography
The product photography process begins with capturing high-quality digital images. While typical small businesses can’t invest in expensive professional photo shoots or high-end camera equipment, there are affordable alternatives. For this post, I’ve tested the PULUZ Upgraded 16" x 16" Portable Photo Studio Light Box, an easy-to-use solution for jewelry and product photography. Available on Amazon for $100–120 (with prices dropping to $70–80 during Black Friday sales), this light box features built-in continuous LED lighting, eliminating the need for additional lighting equipment. I paired this with the cost-effective Canon EOS R8 full-frame mirrorless digital camera and the budget-friendly Canon RF50mm f1.8 prime lens. To ensure accurate and consistent color reproduction, I also incorporated a Whibal White Balance Reference pocket card into my setup.
The Canon EOS R8 camera connects directly to computers and smartphones via USB-C. When paired with Canon’s EOS Utility software, the EOS R8 enables tethered remote-control shooting. This capability is a standard feature among most major professional camera manufacturers, including Nikon, Fujifilm, Sony, and Panasonic.
The product images in this post were captured in Canon’s C-RAW format (.CR3 file extension), which provides lossless image quality and pixel compression.
Editing RAW Images
The 16 bits/channel RGB RAW CR3-format images can be processed using editing software, including Canon’s Digital Photo Professional (DPP), Adobe Lightroom, and Adobe Photoshop (with the Adobe Camera Raw plug-in). Typical post-processing tasks include adjusting white balance, correcting colors, removing product imperfections, fine-tuning highlights and shadows, sharpening images, and straightening compositions.
The final product images underwent all necessary adjustments while remaining in the full-resolution RAW format.
Composing the Product
After selecting and color-adjusting the final product shot, we position the product within an image layout where we’ll create or replace the background using generative AI. Using Adobe Photoshop, we place the product shown below in a landscape layout with a 3:2 aspect ratio. The overall layout dimensions are 1536 pixels by 1024 pixels, simulating the specifications for our final digital advertisements.
Below are additional examples of the same product positioned in typical wide-format layouts with different aspect ratios: 1:1, 2:1, 3:2, and 5:4 (indicated in pink).
Once the product is positioned in the layout, we create a layer mask, which hides portions of the layer (the existing product background) and reveals the layers underneath. We can use a vector mask, a resolution-independent path that clips the layer’s contents to create the layer mask. Vector masks are usually more accurate than those created with pixel-based tools.
We can also use the remove background feature of Adobe Photoshop to create the layer mask automatically if the product has sufficient visual separation from the background. However, this method tends to give less precise results.
Generative AI
When preparing images for generative AI, certain image generation models and workflows perform better with random color data in the background. Adding random noise to the background can enhance these results. To prepare my images for background replacement, I typically create a PNG file containing two layers: one with the product and its alpha mask and another with random noise filling the background.
Generative AI Options
Today’s state-of-the-art AI platforms offer powerful image-generation models that can replace or create captivating new backgrounds for your product photography. In this post, I’ve created product shots with various AI-generated backgrounds that I created using several leading platforms, including:
- Amazon Titan Image Generator G1 v2 Outpainting (Amazon Bedrock)
- Black Forest Labs FLUX.1 Fill Outpainting (Replicate Playground)
- Stability AI Replace Background and Relight (Stability AI API)
- ComfyUI/IC-Light-Native/Realistic Vision (Amazon WorkSpaces)
Relighting
While all these options work well, only ComfyUI using IC-Light-Native and the SD 1.5-based Realistic Vision 5.1 or DreamShaper 8 model correctly relight the product based on the newly generated background in my tests. Stability AI’s new Replace Background and Relight feature also relights the subject. Still, I struggled to get high-quality backgrounds and product relighting that came close to the quality of IC-Light-Native. Without relighting the subject properly, it will appear to float above the background and look unnatural.
ComfyUI Workflows
The ComfyUI workflows I created for this post are available on OpenArt: Product Composite IC-Light Workflow and Product Background Replacement with IC-Light-Native and Detailer.
Generative AI Compute Resources
I typically run ComfyUI on AWS using an Amazon WorkSpaces virtual desktop with an Ubuntu-based GraphicsPro.g4dn bundle. This bundle has 64 GB of RAM and an NVIDIA T4 Tensor Core GPU containing 16GB of VRAM. Amazon WorkSpaces’s AutoStop feature allows for hourly billing based on usage rather than a flat monthly fee; essentially, you don’t pay when the WorkSpace is not in use.
I also run ComfyUI on a local Microsoft Windows desktop, which is equally equipped with 64 GB of RAM and an NVIDIA GeForce RTX 4080 SUPER with 16GB of VRAM. With either of these configurations, producing a 1536 x 1024 image with 25 steps takes about one minute.
In this post, I explored various AI platforms that create background variations for targeted advertisements in specific aspect ratios and sizes. Through experience, I’ve learned that generating multiple images is necessary to achieve background variations of acceptable quality. My process involves engineering an effective prompt and testing it with six to nine random seed values (different image versions). For context, a “seed value” is a numerical input that serves as a starting point for the random number generator used in image creation.
Prompt Engineering
Crafting creative, richly detailed, and effective prompts that generate perfect product backgrounds from AI models is challenging. However, we can harness generative AI itself to assist with prompt writing (aka prompt engineering). I typically begin with a simple prompt and then work with Anthropic Claude 3.5 Sonnet to refine it, either through Amazon Bedrock or directly via Anthropic’s platform.
Maintaining Brand Integrity While Relighting
One challenge when using IC-Light-Native with ComfyUI is the loss of detail and color shifting that occurs while relighting subjects. The loss of detail is particularly noticeable with text on products. Following the ComfyUI node author’s recommendation, I use IC-Light’s Detail Transfer node, which enhances visual quality by transferring intricate details from one image to another. According to Salt AI, this node specifically focuses on improving texture and depth in target images, ensuring the final output maintains a high level of detail and realism.
In addition to using IC-Light’s Detail Transfer node, I composite the original masked product image back over the top of the generated image in post-production, usually with a 30–60% opacity in Adobe Photoshop. Overlaying a semi-transparent copy of the original image ensures the product’s brand-specific colors and detail, especially text, are reproduced accurately while still exhibiting the relighting to blend it into the background. Since the product’s position is identical in each background variation, this technique can be quickly applied to multiple images.
Composing the Final Ads
We will use the product shots with generated background variations to produce multiple advertisements. Laying out the ads can be done manually using programs like Adobe Photoshop, Illustrator, and InDesign or with web-based design tools such as Canva or Figma. Alternatively, you can compose the advertising programmatically using the same Adobe products (e.g., Adobe Photoshop API, now integrated into Firefly Services) or using Python with popular libraries such as Pillow (PIL Fork), GIMP (Python-Fu) or ImageMagick (PythonMagick). A programmatic or hybrid approach to automate the creative production process is more typical for high-volume digital ad generation.
We incorporate graphic elements, logos, headlines, copy, call-to-action, product pricing, and other details alongside the product shot with generated background variations into the final layouts.
We can quickly produce multiple versions of our advertisement using identical layouts, text, and graphics but vary the product backgrounds. These variations may be used across different marketing channels, distinct target customer personas, or various geographic regions.
Additional Uses for Generative AI
Generative AI has many other uses in the creative advertising production process besides generating unique product backgrounds and helping us write richly detailed prompts. For example, we can leverage AI to help us improve our copywriting for headlines, ad copy, and the call to action (CTA).
Below are variations based on the first advertisement (upper left) using the same layout, product shot, and background variation but different headlines and copy. The new headlines were created with the help of Generative AI, while the ad copy came from existing product descriptions. The product image, copy, product description, and company history were all used as context in the prompt to create the appropriate and compelling headlines.
Conclusion
In this post, we explored how to improve the creative advertising production process by combining cost-effective product photography with cutting-edge generative AI technology. We discovered how to harness the power of AI throughout the creative journey, enabling teams to produce premium-quality results faster and more efficiently than ever before.
If you are not yet a Medium member and want to support authors like me, please sign up here: https://garystafford.medium.com/membership.
This blog represents my viewpoints and not those of my employer, Amazon Web Services (AWS). All product names, images, logos, and brands are the property of their respective owners. All product advertisements in this post were created for educational purposes; I have no affiliation with these products’ manufacturers, distributors, or retailers.
