微信扫码
添加专属顾问
我要投稿
掌握Nano Banana提示词技巧,让你的AI图像创作事半功倍! 核心内容: 1. Nano Banana多模态模型的五大核心功能解析 2. 从关键词堆砌到场景化描述的提示词优化策略 3. 不同创作需求下的专业提示词模板与实战案例
【本文翻译自 Google 官方文档】
Gemini 2.5 Flash Image(又名 Nano Banana) 是 Google 最新一代的多模态模型,速度更快、效率更高。它的特别之处在于架构从一开始就为“文本+图像”而设计,可以在同一步里处理两种输入。
这意味着它不仅能生成图像,还能做更复杂的事:比如用对话方式修改图像、多张图像的合成,甚至能对画面内容进行逻辑推理。
它能做的事包括:
使用它时的核心原则是:尽量用完整描述来描绘场景,而不是只丢关键词。因为 Gemini 的强项是语言理解,写成小故事式的提示往往比关键词堆砌效果好。
你可以在官方文档里用代码试试,或者直接在 Google AI Studio 上动手。
文生图
文本生成图像的几种常见方式:
照片级真实感
想要逼真的效果,就像摄影师一样描述:镜头角度、光线、细节都会影响结果。
模板:
A photorealistic [shot type] of [subject], [action or expression], set in [environment]. The scene is illuminated by [lighting description], creating a [mood] atmosphere. Captured with a [camera/lens details], emphasizing [key textures and details]. The image should be in a [aspect ratio] format.
一个逼真的[拍摄类型]的[主体],[动作或表情],设定在[环境]中。场景由[光照描述]照亮,营造出[氛围]的气氛。使用[相机/镜头细节]拍摄,强调[关键纹理和细节]。图像应为[画幅比例]格式。
示例提示:
A photorealistic close-up portrait of an elderly Japanese ceramicist with deep, sun-etched wrinkles and a warm, knowing smile. He is carefully inspecting a freshly glazed tea bowl. The setting is his rustic, sun-drenched workshop. The scene is illuminated by soft, golden hour light streaming through a window, highlighting the fine texture of the clay. Captured with an 85mm portrait lens, resulting in a soft, blurred background (bokeh). The overall mood is serene and masterful. Vertical portrait orientation.
一个逼真的特写肖像,描绘一位日本老年陶艺家,他有着深深的日晒皱纹和温暖的、知性的微笑。他正在仔细检查一个刚上釉的茶碗。背景是他那间阳光明媚的乡村工作室。场景由透过窗户的柔和、黄金时刻的光线照亮,突出了泥土的精细纹理。使用 85mm 肖像镜头拍摄,产生了柔和的模糊背景(浅景深)。整体氛围是宁静而精湛的。垂直肖像方向。
示例输出:
风格化插画与贴纸
要创建贴纸或图标,记得把风格写清楚,还要特别要求“背景必须是白色”。
模板:
A [style] sticker of a [subject], featuring [key characteristics] and a [color palette]. The design should have [line style] and [shading style]. The background must be white.
一个具有[风格]的[主题]贴纸,包含[关键特征]和[色彩搭配]。设计应具有[线条风格]和[阴影风格]。背景必须是白色的。
示例提示:
A kawaii-style sticker of a happy red panda wearing a tiny bamboo hat. It’s munching on a green bamboo leaf. The design features bold, clean outlines, simple cel-shading, and a vibrant color palette. The background must be white.
一个可爱的风格贴纸,展示了一只穿着小竹帽的开心红熊猫,它正在啃食一片绿色的竹叶。设计特点是有粗犷、干净的轮廓,简单的赛璐璐着色,以及鲜艳的色彩搭配。背景必须是白色。
示例输出:
图像里的文字
Gemini 可以在画面里生成准确的文字。写清楚需要的字体、风格和颜色就行。
模板:
Create a [image type] for [brand/concept] with the text “[text to render]” in a [font style]. The design should be [style description], with a [color scheme].
为 [品牌/概念] 创建一个 [图片类型],其中包含文字 "[要渲染的文字]",使用 [字体样式]。设计应为 [风格描述],采用 [配色方案]。
示例提示:
Create a modern, minimalist logo for a coffee shop called ‘The Daily Grind’. The text should be in a clean, bold, sans-serif font. The design should feature a simple, stylized icon of a coffee bean seamlessly integrated with the text. The color scheme is black and white.
为名为"The Daily Grind"的咖啡店设计一个现代、极简风格的标志。文字应使用干净、粗体的无衬线字体。设计应包含一个简单的、风格化的咖啡豆图标,与文字无缝融合。配色方案为黑白。
示例输出:
产品模型与商业摄影
创建干净、专业的产品照片,适用于电商、广告或品牌推广。
模板:
A high-resolution, studio-lit product photograph of a [product description] on a [background surface/description]. The lighting is a [lighting setup, e.g., three-point softbox setup] to [lighting purpose]. The camera angle is a [angle type] to showcase [specific feature]. Ultra-realistic, with sharp focus on [key detail]. [Aspect ratio].
一张高分辨率的、在[背景表面/描述]上的[产品描述]的影棚灯光产品照片。灯光设置为[灯光设置,例如,三点柔光箱设置]以达到[灯光目的]。相机角度为[角度类型]以展示[特定功能]。超逼真,对[关键细节]有清晰的焦点。[宽高比]。
示例提示:
A high-resolution, studio-lit product photograph of a minimalist ceramic coffee mug in matte black, presented on a polished concrete surface. The lighting is a three-point softbox setup designed to create soft, diffused highlights and eliminate harsh shadows. The camera angle is a slightly elevated 45-degree shot to showcase its clean lines. Ultra-realistic, with sharp focus on the steam rising from the coffee. Square image.
一张高分辨率的、在摄影棚灯光下拍摄的最小主义陶瓷咖啡杯照片,呈现在抛光混凝土地面上。灯光采用三点式柔光箱设置,旨在创造柔和的漫反射高光并消除刺眼的阴影。相机角度略微抬高45度,以展示其简洁的线条。超逼真,焦点清晰地对准从咖啡中升起的蒸汽。方形图像。
示例输出:
极简与留白设计
创建网站、演示文稿或营销材料的背景图,便于叠加文字。
模板:
A minimalist composition featuring a single [subject] positioned in the [bottom-right/top-left/etc.] of the frame. The background is a vast, empty [color] canvas, creating significant negative space. Soft, subtle lighting. [Aspect ratio].
一个极简构图,只有一个[主体]位于画面的[右下角/左上角等]位置。背景是广阔、空旷的[颜色]画布,形成了显著的负空间。柔和、微妙的光线。[长宽比]。
示例提示:
A minimalist composition featuring a single, delicate red maple leaf positioned in the bottom-right of the frame. The background is a vast, empty off-white canvas, creating significant negative space for text. Soft, diffused lighting from the top left. Square image.
一个极简的构图,在画面的右下角放置了一片精致的红色枫叶。背景是一个广阔、空旷的浅白色画布,为文字创造了显著的内负空间。光线柔和、漫射,来自左上方。方形图像。
示例输出:
连环画 / 分镜
逐格创造视觉叙事,适用于分镜脚本、连环画或其他形式的连续艺术。
模板:
A single comic book panel in a [art style] style. In the foreground, [character description and action]. In the background, [setting details]. The panel has a [dialogue/caption box] with the text “[Text]”. The lighting creates a [mood] mood. [Aspect ratio].
一个采用 [艺术风格] 风格的漫画书面板。前景是 [角色描述和动作]。背景是 [场景细节]。面板有一个 [对话/标题框],文字为 "[文本]"。光照营造出 [氛围] 的氛围。[画幅比例]。
示例提示:
A single comic book panel in a gritty, noir art style with high-contrast black and white inks. In the foreground, a detective in a trench coat stands under a flickering streetlamp, rain soaking his shoulders. In the background, the neon sign of a desolate bar reflects in a puddle. A caption box at the top reads “The city was a tough place to keep secrets.” The lighting is harsh, creating a dramatic, somber mood. Landscape.
一个采用硬汉、黑色电影艺术风格的漫画书面板,采用高对比度的黑白墨水。前景是一个穿着风衣的侦探站在摇曳的街灯下,雨水浸湿了他的肩膀。背景是一个荒凉的酒吧的霓虹灯招牌在积水中反射。顶部有一个标题框,写着“这座城市是保守秘密的艰难之地。”光照强烈,营造出戏剧性和忧郁的氛围。横版。
示例输出:
图像编辑
这里是 Gemini 2.5 Flash Image 多模态真正的强项。你可以在文本提示的同时提供一张或多张图像,进行编辑、合成或风格迁移。
图像编辑:添加与删除元素
提供一张图像,然后描述你希望的变化。模型会分析原图的风格、光线和视角,使编辑看起来自然,并在系列图像中保持角色一致性。
模板:
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].
使用提供的[主体]图片,请[添加/移除/修改][元素]到/从场景中。确保更改能够[描述更改应如何整合]。
示例提示:
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.
使用我提供的猫的图片,请在它的头上加一顶小型的针织巫师帽。让它看起来像是舒适地坐着,并且与照片的柔和光线相匹配。
示例输入和输出:
局部区域编辑
你可以对 Gemini 2.5 Flash Image 说,只修改图像的一部分,而保持其余完全不变。
模板:
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.
使用提供的图像,只将 [特定元素] 更改为 [新元素/描述]。保持图像中的其他所有内容完全相同,保留原始风格、光照和构图。
示例提示:
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.
使用提供的客厅图片,仅将蓝色的沙发更改为一件复古、棕色皮革的切斯特菲尔德沙发。保持房间其余部分,包括沙发上的枕头和照明,不变。
示例输入和输出:
风格迁移(Style transfer)
提供一张照片,让模型将内容以某种艺术风格重现。
模板:
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].
将提供的[主题]照片转化为[艺术家/艺术风格]的艺术风格。保留原始构图,但使用[风格元素描述]进行渲染。
示例提示:
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.
将提供的现代城市街道夜景照片转化为文森特·梵高的《星夜》艺术风格。保留建筑物和汽车的原有构图,但使用旋转的厚涂笔触和深蓝色与亮黄色的戏剧性调色板来渲染所有元素。
示例输入和输出:
高级合成:多图合成
提供多张图像作为参考,生成一个全新的合成场景。这适用于产品 模型(Mockup) 或创意拼贴。
模板:
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中的元素]放置在[图像2中的元素]上/旁边。最终图像应呈现[最终场景的描述]。
示例提示:
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 an outdoor environment.
创建一张专业的电子商务时尚照片。将第一张图片中的蓝色花卉连衣裙拿给第二张图片中的女人穿上。生成一张穿着连衣裙的女士全身真实照片,调整灯光和阴影以匹配户外环境。
示例输入和输出:
最佳实践
在构建过程中,以下是一些与图像生成相关的小技巧:
描述要非常具体:细节越多,控制力越强。例如,不要只写“幻想盔甲(fantasy armor)”,而是写“装饰华丽的精灵板甲,刻有银叶图案,带有高领和鹰翼形状的肩甲。(ornate elven plate armor, etched with silver leaf patterns, with a high collar and pauldrons shaped like falcon wings)”。
修正角色一致性:如果反复编辑后角色特征出现偏差,可以重新开始对话,并用更详细的描述保持一致。
提供上下文与用途:说明图像的用途会有助于模型。例如,“为一家高端、极简风护肤品牌设计 logo(Create a logo for a high-end, minimalist skincare brand)”会比单纯“创建一个 logo(create a logo)”效果更好。
迭代与优化:不要期望第一次就完美。利用对话式交互进行小改动,例如“很好,但能让光线更暖一点吗?”或“保持其他不变,把人物表情改得更严肃些。”
使用“语义否定提示”:与其说“no cars”,不如正面描述“一条空旷、荒凉的街道,没有交通迹象。(an empty, deserted street with no signs of traffic)”。
保持纵横比:Gemini 2.5 Flash Image 通常会保留输入图像的纵横比。如果没有,请在提示中明确指出:“Update the input image… Do not change the input aspect ratio.”
如果您上传了具有不同宽高比的多个图像,模型将采用提供的最后一个图像的宽高比。如果您需要为新图像指定特定的宽高比,而提示没有产生所需效果,最佳做法是在提示中包含一个具有正确尺寸的参考图像。
镜头控制:使用摄影和电影语言来控制构图。诸如广角镜头(wide-angle shot) 、 微距镜头(macro shot) 、 低角度视角(low angle perspective) 、85mm 人像镜头(85mm portrait lens)和倾斜角度(Dutch angle)等术语让你能够精确控制最终图像。
局限性
我们在持续改进模型的过程中,希望对不足之处保持坦诚。
虽然 Gemini 2.5 Flash Image 功能强大且灵活,但对于一些复杂、细腻的请求,想在第一次就做到完美并不容易,往往需要多次尝试。
比如在生成复杂的排版,或在多张图片中保持角色特征完全一致时,可能需要通过追加提示来微调。
我们正在积极改进这些问题,也感谢你在探索过程中展现的创造力——这将帮助我们共同打造下一代图像工具。
下一步?动手创作吧!
你已经具备了用 Gemini 2.5 Flash 制作和编辑精美图像的基础技能。要提升效果,最好的方式就是不断实践。以下资源可以帮你继续深入:
在 Google AI Studio 中体验 Gemini:用网页工具快速上手本指南里的技巧。
阅读官方文档:面向希望在自己应用中集成 Gemini 2.5 Flash 图像生成功能的开发者。
查看价格信息:了解通过 Gemini API 使用 Gemini 2.5 Flash Image 生成时涉及的费用。
尝试 Image Editing Applet:体验 AI 照片编辑,套用创意滤镜,或仅凭简单文本指令完成专业调整。
53AI,企业落地大模型首选服务商
产品:场景落地咨询+大模型应用平台+行业解决方案
承诺:免费POC验证,效果达标后再合作。零风险落地应用大模型,已交付160+中大型企业
2025-09-02
Anthropic内部泄露:让Claude性能提升10倍的Prompt工程实践
2025-09-01
从提示词到知识库:打造可靠AI Agent的实战指南
2025-08-30
从提示词创作者到AI架构师:提示词优化自动化指南
2025-08-28
涌现观点|Prompt工程的"核武器":一门年收入千万的"说话艺术"
2025-08-28
来自 Reddit 的神 Prompt,号称可以发挥 100% GPT-5 的潜力:
2025-08-27
从提示词工程到上下文工程的演进之路
2025-08-26
吉德林法则:一个好问题,胜过一千个好答案(附Prompt)
2025-08-25
99%的人都忽略了的AI关键技能:JSON提示词
2025-06-27
2025-06-21
2025-06-12
2025-06-10
2025-07-03
2025-07-04
2025-07-20
2025-07-03
2025-08-20
2025-07-14
2025-09-02
2025-08-11
2025-08-10
2025-07-24
2025-07-22
2025-07-19
2025-07-08
2025-07-04