Full site navigation

AI model sub-channel
AI product discovery
Ranking breakdown
Language · English
Chapter 2 Hands-on ~9 min Verified 2026-12-06

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.

What You’ll Learn

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.

Prerequisites
Latest Update FLUX Fill (dedicated weight for local redrawing) combined with the automatic matting node (RMBG-2.0) maintains the clarity of the original product and the naturalness of edge blending far exceeds that of traditional SDXL Inpaint.
01

Core Commands & Key Techniques

3 items
RMBG-2.0 自动抠图
Generate accurate product masks with one click

Automatically separate the product body and background, and invert the mask (InvertMask) to lock the product and only draw the background.

InpaintModelConditioning
Accurate mask redrawing

Use the FLUX Fill weight to generate a desktop and natural reflection outside the mask that matches the perspective of the product.

ImageCompositeMasked
Original image lossless postback

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.

02

High-frequency shortcut keys and practical skills

Must memorize shortcut keys
Right-click on the canvas to edit the mask 节点图片右键 → Open in MaskEditor
Handy and practical tips
01
Slightly expand the mask edge outward by 4~6 pixels (GrowMask) This allows the redraw model to smoothly draw the contact shadow and environmental reflection at the bottom of the product, completely eliminating the "sticker feel".
02
The background prompt words must match the original shooting camera position The original picture was taken head-on, so the background should be written as `eye-level view'; the original picture was taken from above, the background should be written as `top-down flat lay', so that the perspective does not violate the harmony.
03
Connect to Batch Image Loader and run the entire folder with one click Put the white background pictures of 20 SKUs in the same folder, fix the same set of brand scene prompts, and automatically batch the pictures.
03

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
04

Comparison between inefficient questioning method and golden questioning method

✕ Directly redraw the entire image (Denoise=0.7)

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.

✓ RMBG Cutout and Inverse Mask + Perspective Consistent Background Redraw + Subject Posting

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.

05

E-commerce product replacement background perspective lighting prompt word workshop

Modify parameters and automatically assemble, copy and use with one click
Live Preview
{{angle}} commercial product photography setting, {{surface}}, {{mood}}, natural contact shadow grounding the product, clean negative space, high-end advertising aesthetic.
06

Step-by-Step Walkthrough

0 / 2 steps done
01

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.

Expected Output Get accurate background redraw area.
Practical Tips Adding 4px feathering to the mask can effectively eliminate the white edges of the cutout.
02

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.

Expected Output A zero-cost AI studio shooting line that can directly mass-produce main images and detail pages.
Practical Tips Keep the light and shadow direction (left/right) consistent with the high-gloss surface of the original product, and the realism will be directly maximized.
07

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.
08

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".

eye-level commercial scene, oak wood counter with warm window light and soft contact shadow
验收标准:The product logo in the three pictures is 100% clear and undeformed, and the bottom shadow fits the countertop.

Security verification

Please complete the verification before proceeding.