Automatically change the background of e-commerce products and integrate light and shadow: cutout + ControlNet + IC-Light batch workflow
As an e-commerce company, you are most afraid of AI distorting product logos and bottle shapes! Using the standard workflow of "original image pixel locking + redrawing background only + re-lighting and fusion", 50 studio-level scene images were produced in one hour.
Master the workflow of changing the background of e-commerce products with 100% fidelity, so that the shape and text of the product have zero distortion and the edge light and shadow naturally fit the new scene.
Core Commands & Key Techniques
3 itemsRMBG-2.0 自动抠图
Automatically separate the product body and background, and invert the mask (InvertMask) to lock the product and only draw the background.
InpaintModelConditioning
Use the FLUX Fill weight to generate a desktop and natural reflection outside the mask that matches the perspective of the product.
ImageCompositeMasked
The last step is to paste the original product pixels (light feathering of the edges 2~4px) back to ensure that the small text on the bottle is 100% authentic.
High-frequency shortcut keys and practical skills
Tool and model selection comparison
| Tools/Patterns | Best applicable scenarios | Fees and methods | Practical suggestions |
|---|---|---|---|
| FLUX Fill mask redraw | High-precision commercial shooting posters, glass bottles/reflective material scenery changes | Single 12~20 seconds | Extremely realistic edge lighting and contact shadows |
| Original image repost + lightweight IC-Light | 100% pixel-level fidelity is required for product small print and barcodes | 1 more step synthesis node | Redraw first and then paste the main body to prevent text deformation |
Comparison between inefficient questioning method and golden questioning method
Place this bottle of shampoo on the marble bathroom counter (full image img2img)
Cause of the problem:Redrawing the entire image will change all brand words and logos on the bottle to ghost symbols, making it completely unavailable for sale.
eye-level commercial studio scene, minimalist white travertine bathroom counter with soft water droplets, warm morning sunlight coming from the left, subtle contact shadow under the bottle, ultra clean background
Core advantages:The main body text is preserved at the pixel level, and the shadows on the countertop and the lighting direction are closely matched.
E-commerce product replacement background perspective lighting prompt word workshop
Step-by-Step Walkthrough
Connect to RMBG-2.0 to automatically cut out and invert the mask
Upload the product image with a white background, check the Mask preview to ensure that the subject is complete and the white background is intact, and then use InvertMask to lock the subject.
Run FLUX Fill to generate the scene and paste back the original body verification text
Zoom in to check the clarity of the bottle logo and the naturalness of the bottom shadow. Once the standards are met, save it as a template for team reuse.
Frequently Asked Questions and One-Sentence Correction
| common phenomenon | Cause analysis | one sentence correction instruction | Actions |
|---|---|---|---|
| The product is suspended on the countertop like a picture cut out and pasted on. | The mask is too rigid and leaves no room for the bottom shadow to be redrawn. |
Add `GrowMask(expand=6, tapered_corners=true)` after InvertMask, and explicitly add `natural contact shadow` to the prompt word.
|
Downloads & 3-Min Practice
10 minutes of practice: swap out 3 sets of advanced studio shooting scenes for a product picture taken with a mobile phoneabout 10 minutes
Use RMBG + FLUX Fill to generate three scene images: "Stone Minimalist Style", "Natural Wood Table Style" and "Water Waves Cool Wind".