Transform Your Product Images with AI-Driven Background Swap and Clothing Swap

CN
ComfyUI.org
2025-06-19 09:46:32

1. Workflow Overview

mc374acka2t9eercl4n电商雅座.jpg
  • Purpose:
    Named "A Rui - Product Migration_Background Swap_Clothing Swap_Redux+ACE++", this workflow is designed for product image editing, including:

    • Background Replacement: Migrate white-background product images to new scenes.

    • Clothing Swap: Modify apparel via masking and inpainting.

    • Advanced Control: Combines Redux (fine-grained redraw control) and ACE++ (stylization LoRA).

  • Core Models:

    • Stable Diffusion Inpaint (F.1-Fill-fp16_Inpaint&Outpaint_1.0): For local redrawing.

    • ACE++ LoRA: Enhances details and stylization.

    • ReduxAdvanced Node: Precision control over redraw areas.

2. Key Components

Critical Nodes:

  1. LoadImage:

    • Loads product (white background) and background images (requires manual mask).

  2. ImageResizeKJ:

    • Resizes images to 1200x1600 (Lanczos interpolation).

  3. Joy_caption_two:

    • Uses Meta-Llama-3 to generate text prompts from images.

    • Plugin: comfyui_slk_joy_caption_two.

  4. ReduxAdvanced:

    • Controls redraw conditions (e.g., area, keep aspect ratio).

    • Plugin: ComfyUI_AdvancedRefluxControl.

  5. KSampler:

    • Sampler: euler, 30 steps, CFG=1.

Dependencies:

  • ACE++ LoRA: Download and place in models/loras/.

  • ReduxAdvanced Plugin: Install via ComfyUI Manager or GitHub.

3. Workflow Structure

Groups:

  1. Global Input:

    • Loads models (UNETLoader), VAE, and CLIP.

  2. Captioning:

    • Generates prompts via Joy_caption_two.

  3. Core FILL+Redux:

    • Combines InpaintModelConditioning and ReduxAdvanced.

  4. Image Merge & Crop:

    • Merges images (ImageConcanate) and crops target areas (Image Crop Location).

4. Inputs & Outputs

  • Inputs:

    • Images: Product (white bg) + background (masked).

    • Text: Auto-generated or manual prompts.

    • Params: Resolution 1200x1600, seed randomize.

  • Output:

    • Final composite image (saved via SaveImage).

5. Tips & Warnings

  • VRAM: ≥8GB GPU recommended; use --medvram for high-res.

  • Plugins: Ensure comfyui_layerstyle and comfyui-kjnodes are installed.

  • Mask Precision: Manual masks must cover edges to avoid artifacts.