返回博客
指南
6 分钟阅读

AI 换背景:怎样换出自然真实的照片背景

用提示词给产品图和人像换背景:怎么写、怎样让边缘、光线和阴影自然、怎样用背景参考图,以及本站做不到的事(不支持透明 PNG)。

上传照片,写下 "把背景换成 ___,[主体] 保持完全不变",画面比例保持 auto,然后生成。让结果看起来真实的关键是光线:描述一个光线与主体一致的背景,并要求在主体接触地面的地方加上阴影。

AI 换背景会打开编辑器并预填一条提示词。本文介绍产品图和人像分别怎么写,以及需要先了解的限制。

提示词

Replace the background with [the new place or backdrop], [light that
matches the subject]. Keep [the subject] exactly the same.

(意思是:把背景换成 [新场景],[与主体匹配的光线],[主体] 保持完全不变。用中文写也可以。)

三个部分:

  1. 新背景,要具体:"大理石厨房台面,后面是虚化的窗户",而不是 "好看的厨房"。
  2. 光线:方向、软硬和颜色。这决定主体能否融入背景。
  3. 保留句:写出主体,以及不能变的细节。

产品图

产品图是最常见的用途,也最容易做好:物体是刚性的,光线也简单。

干净的影棚背景

Replace the background with a seamless light-grey studio backdrop. Soft
light from the front left, a soft shadow under the product. Keep the
product, its label and its colours exactly the same.

电商用纯白背景

Replace the background with pure white (#FFFFFF), evenly lit, with a
faint natural shadow under the shoe. Keep the shoe exactly the same.

如果平台对背景有严格要求,上传前请对照要求检查结果。

生活场景

Place the coffee bag on a rustic wooden table in a sunny café, coffee
beans scattered around it, warm morning light from the right, background
softly out of focus. Keep the bag's shape, colours and printed text
exactly the same.

产品图要点:

  • 拍摄角度要一致。 平视拍的瓶子放到俯视的桌面上会很别扭。按原图写 "平视" 或 "略微俯视"。
  • 要求接触阴影。 "瓶子与桌面接触处有柔和阴影" 能让物体 "落地",否则看起来像悬浮着。
  • 亮面和玻璃产品会反射周围环境。瓶子、首饰、手机可以加一句 "with subtle reflections of the new background"(带有新背景的淡淡反光)。
  • 标签和小字。 加上 "标签文字保持完全不变",并放大检查结果。如果字变了,试试 Nano Banana Pro 或 GPT Image 2,这两个模型处理文字最好。

人像

Replace the background with a softly blurred city street at dusk, warm
shop lights behind her. Keep her face, hair, expression, pose and
clothes exactly the same.
Replace the background with a plain mid-grey wall for a professional
headshot, soft even light. Keep his face, hair, glasses and suit
exactly the same.

人像要点:

  • 在保留句里写上脸和头发。 头发是最难处理的边缘;原图清晰时,效果明显好于模糊或很小的原图。
  • 保持光线方向。 如果阳光从左边照到人身上,就要一个从左边照亮的背景。光线方向和主体不一致,是换完背景像 "贴上去" 的最常见原因。
  • 利用景深。 背景稍微虚化("softly out of focus")能掩盖小的不协调,看起来也像真实的人像镜头。
  • 人物只占画面一部分时用 2K 生成。 像素越多,脸和头发的细节越多。

用一张背景照片

想把主体放进某个具体场景,就把场景作为第二张图上传:

Place the person from Image 1 into the scene from Image 2, standing on
the path in the centre. Match the late-afternoon light of Image 2. Keep
the person's face, hair and clothes from Image 1.

主体放第一张。比例为 auto 时,结果沿用 Image 1 的形状;想用背景照片的形状,就手动选择比例。

让边缘和阴影自然

  • 从好的原图开始: 主体清晰、光线均匀。主体模糊或埋在阴影里,模型能保留的信息就少。
  • 按看到的样子描述光线: "柔和的阴天光"、"右侧低角度的暖色阳光"、"上方明亮的影棚光"。
  • 要求阴影,并说明落在哪里。
  • 色温要一致: 在暖色室内灯下拍的人,放到冷蓝色的海滩上会显得不对。选光线相近的背景,或要求 "调整主体颜色以匹配新光线"(主体会有轻微变化)。
  • 一次只换背景。 其他修改在结果图上继续做。

更多写法见我们的图生图提示词指南。

限制

  • 不支持透明 PNG。 每张结果都是带背景的完整图片,本站不导出透明抠图。如果需要,可以先把主体生成在纯白或纯色背景上,再用抠图工具去掉背景。
  • 整张图会重新生成。 没有画笔或蒙版,改什么由提示词决定。主体上的小细节(Logo、标签文字、戒指)可能会变,请在原尺寸下检查。
  • 上传: JPEG、PNG 或 WebP,每张最大 10 MB。
  • 分辨率: Nano Banana 2、Nano Banana Pro 和 GPT Image 2 最高 4K;Seedream 5.0 Flash 最高 2K。
  • 只用你有权使用的照片。 人物照片需征得本人同意。

选哪个模型,花多少

Nano Banana 2 是默认模型,适合大多数产品和人像换背景:1K 2 积分,2K 3 积分,4K 4 积分。包装文字必须准确时用 Nano Banana Pro(4–6 积分);想低价多试几种背景,用 Seedream 5.0 Flash(2K 以内 2 积分)。详情见模型对比。

新账号赠送 10 积分,生成失败的图片会退还积分。现在就换背景。