Copy Stall

透明商品图换三种背景:先生成空背景,再叠回原商品

Translated by AI, not yet reviewed by a human editor. AI 翻译,尚未经人工审校。

This recipe is in Chinese only.We have not translated it yet. Read the Chinese original

At a glance

Tested model最终方案:SD1.5 · v1-5-pruned-emaonly-fp16.safetensors;失败对照:SD2 inpainting · 512-inpainting-ema.safetensors

Status
Main scenario checked; see practice record
OS
macOS
Version
Comfy Desktop 1.2.2 / ComfyUI 0.46.4
Steps
8
Cost
¥0.00 / run
Practice pack
Download (.zip, Chinese)

Cost details, tools and permissions are on the Chinese page. Original post in Chinese.

Practice record & screenshots

Main scenario checkedEvidence reviewed ·
Tool
Comfy Desktop 1.2.2 / ComfyUI 0.46.4
Environment
Mac mini M4 / 16GB;macOS;Comfy Desktop 1.2.2;ComfyUI 0.46.4;Python 3.13.12;PyTorch 2.12.1 / MPS
Recorded model
最终方案:SD1.5 · v1-5-pruned-emaonly-fp16.safetensors;失败对照:SD2 inpainting · 512-inpainting-ema.safetensors
Recorded usage
0元API费:本机模型及图像节点运行,无Partner API调用;未核算电费、流量、硬盘和人工时间。

Verified results

  • 三种背景各2张,共6张512×512合成图;51528个不透明商品像素逐点一致。旧局部重画方案15次与中间修正3次均保留为失败证据,原“杯子不动只换背景”承诺已订正。
  • 最终6次每次25.496~29.719秒;另含15次旧方案、3次中间方案和1次手涂遮罩试验。

Issues & limits

  • 局部重画的VAE编码解码会改未涂区域,不能保证商品像素不变。
  • inpaint后再叠回原图仍可能在商品外多画杯把,因此最终改成独立空背景生成。
  • grow_mask_by扩大重画区域,可能伤到商品边缘;不是越大越好。
  • Mask Editor的Paint Bucket不是白底自动分割。手涂本次留下白边,需人工检查。
  • 透明边缘按alpha混合,逐像素一致结论仅针对alpha=255的不透明区域。
  • 没有自动补接触阴影和透视匹配;本例不可宣称已经达到真实电商摄影标准。

Step screenshots

11 screenshots

Original screenshots and captions in Chinese, including attempts and corrections. Click to zoom and browse on this page.

旧商品局部重画:窗边场景队列
01 · 旧商品局部重画:窗边场景队列
旧商品局部重画:野餐场景队列
02 · 旧商品局部重画:野餐场景队列
旧商品局部重画:厨房场景队列
03 · 旧商品局部重画:厨房场景队列
Mask Editor手涂背景遮罩
04 · Mask Editor手涂背景遮罩
最终商品背景合成结果
05 · 最终商品背景合成结果
真实生成结果:product-final-window_00001_.png
06 · 真实生成结果:product-final-window_00001_.png
Show remaining 5 screenshots
真实生成结果:product-final-window_00002_.png
07 · 真实生成结果:product-final-window_00002_.png
真实生成结果:product-final-picnic_00001_.png
08 · 真实生成结果:product-final-picnic_00001_.png
真实生成结果:product-final-picnic_00002_.png
09 · 真实生成结果:product-final-picnic_00002_.png
真实生成结果:product-final-kitchen_00001_.png
10 · 真实生成结果:product-final-kitchen_00001_.png
真实生成结果:product-final-kitchen_00002_.png
11 · 真实生成结果:product-final-kitchen_00002_.png

Walk the street