Apps Page Background Image
Learn/Course/How to Use FLUX for Product Cutout and Background Replacement in E-Commerce

FeaturedHow to Use FLUX for Product Cutout and Background Replacement in E-Commerce

2
5
0
MimicPC
03/13/2025
FLUX.1
Guide
Learn how to enhance product images for e-commerce by using Flux to easily change backgrounds and create polished visuals. This step-by-step guide walks you through product image detection, IPAdapter, LoRA, and ControlNet, ensuring seamless and professional results.

Flux product image enhancement,Introduction

In this tutorial, we’ll explore how to use FLUX to easily change and enhance product backgrounds, making your images stand out in a competitive marketplace. Whether you want to remove distracting elements, create a more professional look, or match your branding, FLUX provides a seamless solution to elevate your visuals. Let’s dive in and learn how you can create polished, attention-grabbing product images that drive sales!

E-commerce image background replace

Run This Workflow Now

  • All nodes and models are ready to go.
  • No manual setup required.
  • Error-free—just click and run!

Below is a step-by-step guide that will take you through everything from preparing the images to detail migration, and color adjustment, ensuring your subject blends naturally into the new background.


Using Flux on MimicPC

Getting started with Flux on MimicPC is simple and efficient, allowing you to unlock powerful features for your AI workflows in no time. For more information, please check out our guide on How to Run Flux on MimicPC

Before we start, make sure you are using the lastest version of ComfyUI on MimicPC to access the background replacement feature.

IPAdapter and LoRA setup


Guide to Setting Up and Runing the Workflow

Step 1: Checkpoint Model Installation and Identify Background Image

The following image features a checkpoint model provided by a user, which is a general-purpose model based on SDXL, it is also available for download on CivitAI.

Download link: https://civitai.com/models/112902/dreamshaper-xl

Flux product image enhancement

After setting up the checkpoint model, upload the background image you want to replace it with. In this workflow, we will use the following background image as an example.

E-commerce image background replace


Step 2: Setting up the IPAdapter and Loading LoRA

The following section will go through the IPAdapter and LoRA, where it will be explained step by step.

IPAdapter and LoRA setup

This is the IPAdapter, designed to control reference images and facilitate style transfer. It allows users to manipulate visual elements effectively, ensuring that the desired aesthetics are seamlessly integrated into their projects.

MimicPC product image workflow

This resource provides access to the latest version of the model, allowing users to enhance their projects with its advanced capabilities. Download link: ip-adapter-plus_sdxl_vit-h.safetensors

After download the file, store the file at the following session: Storage>models>ipadapter.

MimicPC product image workflow.

This section is dedicated to loading LoRAs. These LoRAs aim at provide a simple real scene custom style for both scene and product style. It is recommended to use the sample parameters directly, and then modify the detail as needed.

MimicPC product image workflow.

Here are the download links of the LoRAs that used in this workflow:

For E-commerce scene: https://civitai.com/models/180202/e-commerce-photography-sceneslora-v10-showcase

For E-commerce style: https://civitai.com/models/133164/commercestylexl

The grammar is correct in the sentence:


Step 3: Product Image Matting and Masking

In this workflow, this ''eye drop bottle'' will be used as a reference product image.

MimicPC product image workflow.

Firstly, we need to identify product images using a suitable method. Here, we choose PyMatting, a technique for image matting that generates finer edge effects. This tool allows for precise separation of the product from its background, ensuring that the edges are smooth and natural-looking.

MimicPC product image workflow

Secondly, it is necessary to create a mask image for the product. This LayerUtility: GetColorTone V2 step is essential to ensure that the background can be effectively changed while preserving the details and integrity of the product itself.

MimicPC product image workflow

Lastly, the LayerUtility: ImageBlendAdvance V2 is a tool sepcifically designed for advanced blending operations between layer images and background images. It allows users to seamlessly merge multiple image layers while maintaining the integrity of both the foreground and background elements.

MimicPC product image workflow


Step 4: ControlNet Models Installation and Setting

This workflow utilizes two ControlNet models: controlnet-sd-xl-1.0-softedge-dexined.safetensors and t2i-adapter-depth-zoe-sdxl-1.0.safetensors. Both ControlNet Models can be download from the ComfyUI Manager.

MimicPC product image workflow

Th t2i-adapter-depth-zoe-sdxl-1.0.safetensors is used for depth detection, capable of identifying the spatial relationship of objects within an image.

MimicPC product image workflow

The controlnet-sd-xl-1.0-softedge-dexined.safetensors is designed to soften edges, making them smoother and reducing visible seams in composite images.

MimicPC product image workflow


Step 5: Brushnet Model Installation and Image Processing

Now, moving to BrunshNet Loader, the BrushNet model is fine-tuned based on the diffusers/stable-diffusion-xl-1.0-inpainting-0.1, allowing it to effectively enhance and manipulate images. With its capability to outpaint pictures using a mask, users can seamlessly extend or modify image elements beyond their original boundaries.

Download link: https://civitai.com/models/275269/gwmoutpainting

MimicPC product image workflow

As of the complexity of this workflow, it is recommended to use the parameters that have already been adjusted in the original workflow.


Final Outcome Presentation

These clean visually appealling designs highlight the product's features while giving it a polished, professional appearance suitable for e-commerce platforms. The result effectively balance minimalism with nature-inspired aesthetics to draw attention to the product.

MimicPC product image workflow

MimicPC product image workflow


Conclusion

Using this workflow on MimicPC, you can easily enhance your product images by changing and improving their backgrounds. This not only makes your products stand out but also helps in creating a consistent and professional brand image. With the step-by-step guide provided, you can quickly master the process and start creating stunning visuals that drive sales and engagement.

If you have any questions or need further assistance, feel free to reach out to our support team. Happy editing!

Catalogue