用 Nano Banana 修改图片(豆包,即梦,通义也可用)昨天的文章介绍了 Nano Banana 等工具的创建图片提示词原则和示例,今天来看看如何修改图片。

更多 Nano Banana 相关提示词在这里:

其他可能有用的提示词,可以在下方“合集”里找到。

最佳做法

如需将效果从好提升到出色,请将以下专业策略融入您的工作流程。

  • 内容要非常具体:您提供的信息越详细,您对结果的控制就越强。请不要使用“奇幻盔甲”这样笼统的语言,而要具体描述盔甲,例如“装饰华丽的精灵板甲,蚀刻有银叶图案,带有高领和猎鹰翅膀形状的肩甲”。
  • 提供背景信息和意图:说明图片的用途。模型对上下文的理解会影响最终输出。例如,“为高端极简护肤品牌设计徽标”会比“设计徽标”产生更好的结果。
  • 迭代和优化:不要期望第一次尝试就能生成完美的图片。利用模型的对话特性进行小幅更改。然后,您可以继续提出提示,例如“效果很棒,但能让光线更暖一些吗?”或“保持所有内容不变,但让角色的表情更严肃一些。”
  • 使用分步说明:对于包含许多元素的复杂场景,请将提示拆分为多个步骤。“首先,创作一幅清晨薄雾笼罩的宁静森林背景。然后,在前景色中添加一个长满苔藓的古老石祭坛。 最后,在祭坛上放置一把发光的剑。”
  • 使用“语义负提示”:不要说“没有汽车”,而是积极地描述所需的场景:“一条空旷荒凉的街道,没有任何交通迹象。”
  • 控制相机:使用摄影和电影语言来控制构图。例如wide-angle shot、macro shot、low-angle perspective等字词。

限制

  • 为获得最佳性能,请使用以下语言:英语、西班牙语(墨西哥)、日语(日本)、中文(中国)、印地语(印度)。
  • 图片生成不支持音频或视频输入。
  • 模型不一定会完全按照用户明确要求的图片输出数量生成图片。
  • 该模型在输入最多 3 张图片时效果最佳。
  • 在为图片生成文字时,最好先生成文字,然后再要求生成包含该文字的图片,这样 Gemini 的效果会更好。
  • 目前,欧洲经济区 (EEA)、瑞士 (CH) 和英国 (UK) 不支持上传儿童图片。

以下示例展示了如何提供图片以及文本提示,以进行编辑、构图和风格迁移。

1. 添加和移除元素

提供图片并描述您的更改。模型将与原始图片的风格、光照和透视效果相匹配。

模板

1
使用所提供的 [主体] 图片,请 [添加/移除/修改] [元素] 到/从场景中。确保更改 [描述更改应如何融合]。
1
Using the provided image of [subject], please [add/remove/modify] [element] to/from the scene. Ensure the change is [description of how the change should integrate].

提示

1
“使用所提供的我的猫的图片,请在它的头上添加一顶小的针织巫师帽。让它看起来戴得很自然,并与照片中的柔和光线相匹配。”
1
"Using the provided image of my cat, please add a small, knitted wizard hat on its head. Make it look like it's sitting comfortably and matches the soft lighting of the photo."

input-1-cat

output-1-cat_with_hat

2. 局部重绘(语义遮盖)

通过对话定义“蒙版”,以修改图片的特定部分,同时保持其余部分不变。

模板

1
使用所提供的图片,仅将 [具体元素] 改为 [新元素/描述]。保持图片中其他部分完全不变,保留原始的风格、光照和构图。
1
Using the provided image, change only the [specific element] to [new element/description]. Keep everything else in the image exactly the same, preserving the original style, lighting, and composition.

提示

1
“使用所提供的客厅图片,仅将蓝色沙发更换为一张复古的棕色皮质切斯特菲尔德沙发。保持房间的其他部分,包括沙发上的枕头和光线,完全不变。”
1
"Using the provided image of a living room, change only the blue sofa to be a vintage, brown leather chesterfield sofa. Keep the rest of the room, including the pillows on the sofa and the lighting, unchanged."

input-2-living_room

output-2-living_room_edited

3. 风格迁移

提供一张图片,并让模型以不同的艺术风格重新创作其内容。

模板

1
将所提供的 [主体] 照片转换为 [艺术家/艺术风格] 的艺术风格。保留原始构图,但用 [风格元素描述] 进行渲染。
1
Transform the provided photograph of [subject] into the artistic style of [artist/art style]. Preserve the original composition but render it with [description of stylistic elements].

提示

1
“将所提供的现代夜晚城市街道照片转换为梵高《星夜》的艺术风格。保留建筑和汽车的原始构图,但用旋转的厚涂笔触和深蓝、亮黄的戏剧性色调来呈现所有元素。”
1
"Transform the provided photograph of a modern city street at night into the artistic style of Vincent van Gogh's 'Starry Night'. Preserve the original composition of buildings and cars, but render all elements with swirling, impasto brushstrokes and a dramatic palette of deep blues and bright yellows."

input-3-city

output-3-city_style_transfer

4. 高级合成:组合多张图片

提供多张图片作为上下文,以创建新的合成场景。这非常适合制作产品模型或创意拼贴画。

模板

1
通过组合所提供图片中的元素来创建一张新图像。将 [图片1中的元素] 放置在/与 [图片2中的元素] 一起。最终图像应为 [最终场景描述]。
1
Create a new image by combining the elements from the provided images. Take the [element from image 1] and place it with/on the [element from image 2]. The final image should be a [description of the final scene].

提示

1
“创建一张专业的电商时尚照片。从第一张图片中取出蓝色花纹连衣裙,并让第二张图片中的女性穿上它。生成一张逼真的全身照,光线和阴影需调整以匹配户外环境。”
1
"Create a professional e-commerce fashion photo. Take the blue floral dress from the first image and let the woman from the second image wear it. Generate a realistic, full-body shot of the woman wearing the dress, with the lighting and shadows adjusted to match the outdoor environment."

input-4-1-model

input-4-dress

output-4-fashion_ecommerce_shot

5. 高保真细节保留

为确保在编辑过程中保留关键细节(例如面部或徽标),请在编辑请求中详细描述这些细节。

模板

1
使用所提供的图片,将 [图片2中的元素] 放到 [图片1中的元素] 上。确保 [图片1中的元素] 的特征保持完全不变。添加的元素应 [描述元素应如何融合]。
1
Using the provided images, place [element from image 2] onto [element from image 1]. Ensure that the features of [element from image 1] remain completely unchanged. The added element should [description of how the element should integrate].

提示

1
“取第一张棕发、蓝眼、表情中性的女性照片。将第二张图片中的徽标添加到她的黑色T恤上。确保这位女性的面部和特征完全不变。徽标应看起来像是自然印在布料上,随衣服褶皱而贴合。”
1
"Take the first image of the woman with brown hair, blue eyes, and a neutral expression. Add the logo from the second image onto her black t-shirt. Ensure the woman's face and features remain completely unchanged. The logo should look like it's naturally printed on the fabric, following the folds of the shirt."

input-5-1-logo

input-5-woman

output-5-woman_with_logo