Nano Banana Pro 完全指南:专业制作的 10 个技巧

By Guillaume Vernade, Gemini Developer Advocate, Google DeepMind
来源:https://x.com/GoogleAIStudio/status/1994480371061469306

Nano-Banana Pro 较上一代模型有了巨大的飞跃,从“好玩”的图像生成迈向了“实用”的专业资产生产。它在文本渲染、角色一致性、视觉合成、世界知识(搜索)和高分辨率(4K)输出方面表现出色。

开发者指南 介绍了如何上手 AI Studio 和 API 之后,本指南将涵盖其核心能力以及如何有效地编写提示词。

本文包含以下内容:

  • 0 提示词黄金法则
  • 1 文本渲染、信息图表与视觉合成
  • 2 角色一致性与爆款缩略图
  • 3 结合 Google 搜索(Grounding)
  • 4 高级编辑、修复与上色
  • 5 维度转换(2D ↔ 3D)
  • 6 高分辨率与纹理
  • 7 思考与推理
  • 8 单次生成故事板与概念艺术
  • 9 结构控制与布局指导
  • 10 下一步做什么?

🛑 第 0 部分:提示词黄金法则

Nano-Banana Pro 是一个“会思考”的模型。它不仅仅是匹配关键词;它能理解意图、物理规律和构图。为了获得最佳效果,请停止使用“标签堆砌(tag soups)”(例如:狗,公园,4k,逼真),开始像一位创意总监那样行事。

1. 编辑,而不是重新生成 (Re-roll)

该模型非常擅长理解对话式的编辑指令。如果一张图片有 80% 是正确的,不要从头开始生成一张新的。相反,只需告诉它你需要修改的具体细节。

Example: “That’s great, but change the lighting to sunset and make the text neon blue.”
示例:“这很棒,但把光线改成日落,并把文字变成霓虹蓝。”

2. 使用自然语言和完整句子

像给人类艺术家下简报一样与模型对话。使用正确的语法和描述性形容词。

❌ Bad: “Cool car, neon, city, night, 8k.”
❌ 错误示范:“很酷的车,霓虹灯,城市,夜晚,8k。”

✅ Good: “A cinematic wide shot of a futuristic sports car speeding through a rainy Tokyo street at night. The neon signs reflect off the wet pavement and the car’s metallic chassis.”
✅ 正确示范:“一张电影感的广角镜头,展示一辆未来派跑车在夜晚雨后的东京街道上飞驰。霓虹灯的标志倒映在湿漉漉的路面和汽车的金属底盘上。”

3. 具体且具有描述性

模糊的提示词只会产生通用的结果。定义主体、环境、光照和情绪。

Subject: Instead of “a woman,” say “a sophisticated elderly woman wearing a vintage chanel-style suit.”
主体:不要只说“一个女人”,要说“一位身穿复古香奈儿风格套装的精致老妇人”。

Materiality: Describe textures. “Matte finish,” “brushed steel,” “soft velvet,” “crumpled paper.”
材质:描述纹理。“哑光表面”、“拉丝钢”、“柔软的天鹅绒”、“揉皱的纸”。

4. 提供背景信息(“为什么”或“给谁看”)

因为模型会“思考”,提供背景信息有助于它做出合乎逻辑的艺术决策。

Example: “Create an image of a sandwich for a Brazilian high-end gourmet cookbook.” (The model will infer professional plating, shallow depth of field, and perfect lighting).
示例:“为一本巴西高端美食食谱生成一张三明治的图片。”(模型会推断出专业的摆盘、浅景深和完美的光照)。

1. 文本渲染、信息图表与视觉合成

Nano-Banana Pro 拥有最先进(SOTA)的能力,可以渲染清晰、风格化的文本,并将复杂信息合成为视觉格式。

最佳实践

  • 压缩:要求模型将密集的文本或 PDF “压缩”成视觉辅助材料。
  • 风格:指定你想要“精致的社论风格”、“技术图表”还是“手绘白板”外观。
  • 引用:明确指定你想要放在引号中的文本。

提示词示例

Earnings Report Infographic (Data Ingestion):

[Input PDF of Google’s latest earnings report]
“Generate a clean, modern infographic summarizing the key financial highlights from this earnings report. Include charts for ‘Revenue Growth’ and ‘Net Income’, and highlight the CEO’s key quote in a stylized pull-quote box.”
[输入 Google 最新财报的 PDF]
“生成一张干净、现代的信息图,总结这份财报的关键财务亮点。包括‘收入增长’和‘净收入’的图表,并在一个风格化的引用框中突出 CEO 的关键语录。”

Retro Infographic:

“Make a retro, 1950s-style infographic about the history of the American diner. Include distinct sections for ‘The Food,’ ‘The Jukebox,’ and ‘The Decor.’ Ensure all text is legible and stylized to match the period.”
“制作一张复古的、1950 年代风格的关于美式餐馆历史的信息图。包括‘食物’、‘点唱机’和‘装饰’等不同部分。确保所有文本清晰可读,并且风格符合那个时期。”

Technical Diagram:

“Create an orthographic blueprint that describes this building in plan, elevation, and section. Label the ‘North Elevation’ and ‘Main Entrance’ clearly in technical architectural font. Format 16:9.”
“创建一张正投影蓝图,通过平面图、立面图和剖面图来描述这座建筑。用技术建筑字体清晰地标注‘北立面’和‘主入口’。格式为 16:9。”

Whiteboard Summary (Educational):

“Summarize the concept of ‘Transformer Neural Network Architecture’ as a hand-drawn whiteboard diagram suitable for a university lecture. Use different colored markers for the Encoder and Decoder blocks, and include legible labels for ‘Self-Attention’ and ‘Feed Forward’.”
“将‘Transformer 神经网络架构’的概念总结为适合大学讲座的手绘白板图。使用不同颜色的马克笔区分编码器和解码器模块,并包含清晰的‘自注意力(Self-Attention)’和‘前馈(Feed Forward)’标签。”

2. 角色一致性与爆款缩略图

Nano-Banana Pro 支持最多 14 张参考图像(其中 6 张可达高保真度)。这允许进行“身份锁定(Identity Locking)”——将特定人物或角色放入新场景中而不出现面部变形。

最佳实践

  • 身份锁定:明确声明:“保持人物的面部特征与图片 1 完全一致。”
  • 表情/动作:在保持身份的同时描述情绪或姿势的变化
  • 病毒式构图:一次性将主体与大胆的图形和文字结合起来。

提示词示例

The “Viral Thumbnail” (Identity + Text + Graphics):

“Design a viral video thumbnail using the person from Image 1. Face Consistency: Keep the person’s facial features exactly the same as Image 1, but change their expression to look excited and surprised. Action: Pose the person on the left side, pointing their finger towards the right side of the frame. Subject: On the right side, place a high-quality image of a delicious avocado toast. Graphics: Add a bold yellow arrow connecting the person’s finger to the toast. Text: Overlay massive, pop-style text in the middle: ‘3分钟搞定!’ (Done in 3 mins!). Use a thick white outline and drop shadow. Background: A blurred, bright kitchen background. High saturation and contrast.”
“使用图片 1 中的人物设计一个病毒式视频缩略图。面部一致性:保持人物的面部特征与图片 1 完全一致,但将表情改为兴奋和惊讶。动作:将人物放置在左侧,手指指向画面的右侧。主体:在右侧放置一张高质量的美味牛油果吐司图片。图形:添加一个粗大的黄色箭头,连接人物的手指和吐司。文本:在中间叠加巨大的、波普风格的文字:‘3分钟搞定!’。使用粗白色描边和投影。背景:模糊、明亮的厨房背景。高饱和度和对比度。”

The “Fluffy Friends” Scenario (Group Consistency):

[Input 3 images of different plush creatures]
“Create a funny 10-part story with these 3 fluffy friends going on a tropical vacation. The story is thrilling throughout with emotional highs and lows and ends in a happy moment. Keep the attire and identity consistent for all 3 characters, but their expressions and angles should vary throughout all 10 images. Make sure to only have one of each character in each image.”
[输入 3 张不同毛绒生物的图片]
“创作一个有趣的 10 部分故事,讲述这 3 个毛绒朋友去热带度假的故事。故事全程惊险刺激,情绪起伏跌宕,最后以幸福时刻结束。保持所有 3 个角色的服装和身份一致,但他们的表情和角度在所有 10 张图片中应有所不同。确保每张图片中每个角色只出现一次。”

Brand Asset Generation:

[Input 1 image of a product]
“Create 9 stunning fashion shots as if they’re from an award-winning fashion editorial. Use this reference as the brand style but add nuance and variety to the range so they convey a professional design touch. Please generate nine images, one at a time.”
[输入 1 张产品图片]
“创作 9 张令人惊叹的时尚大片,就像出自获奖的时尚社论一样。使用此参考作为品牌风格,但在系列中增加细微差别和多样性,以传达专业的设计感。请一次生成一张,共九张图片。”

3. 结合 Google 搜索(Grounding)

Nano-Banana Pro 利用 Google 搜索基于实时数据、时事或事实验证来生成图像,从而减少在时效性话题上的幻觉。

最佳实践

  • 要求可视化动态数据(天气、股票、新闻)。
  • 模型在生成图像之前会对搜索结果进行“思考”(推理)。

提示词示例

Event Visualization(事件可视化):

“Generate an infographic of the best times to visit the U.S. National Parks in 2025 based on current travel trends.”
“根据当前的旅游趋势,生成一张 2025 年游览美国国家公园最佳时间的信息图。”

4. 高级编辑、修复与上色

该模型擅长通过对话式提示词进行复杂的编辑。这包括“局部重绘(In-painting)”(移除/添加物体)、“修复(Restoration)”(修复老照片)、“上色(Colorization)”(漫画/黑白照片)和“风格转换(Style Swapping)”。

最佳实践

  • 语义指令:不需要手动遮罩;只需自然地告诉模型要更改什么。
  • 物理理解:你可以要求进行复杂的更改,如“在这个杯子里装满液体”,以测试物理生成能力。

提示词示例

移除物体与局部重绘:

“Remove the tourists from the background of this photo and fill the space with logical textures (cobblestones and storefronts) that match the surrounding environment.”
“移除这张照片背景中的游客,并用符合周围环境的逻辑纹理(鹅卵石和店面)填充空间。”

漫画/连环画上色:

[Input black and white manga panel]
“Colorize this manga panel. Use a vibrant anime style palette. Ensure the lighting effects on the energy beams are glowing neon blue and the character’s outfit is consistent with their official colors.”
[输入黑白漫画格]
“给这个漫画格上色。使用充满活力的动漫风格调色板。确保能量束的光效是发光的霓虹蓝,且角色的服装与其官方配色一致。”

本地化(文本翻译 + 文化适应):

[Input image of a London bus stop ad]
“Take this concept and localize it to a Tokyo setting, including translating the tagline into Japanese. Change the background to a bustling Shibuya street at night.”
[输入一张伦敦公交车站广告的图片]
“采用这个概念并将其本地化为东京场景,包括将标语翻译成日语。将背景更改为夜晚熙熙攘攘的涩谷街道。”

光照/季节控制:

[Input image of a house in summer]
“Turn this scene into winter time. Keep the house architecture exactly the same, but add snow to the roof and yard, and change the lighting to a cold, overcast afternoon.”
[输入一张夏天的房子的图片]
“把这个场景变成冬天。保持房屋建筑完全不变,但在屋顶和院子里加雪,并将光线变成寒冷、阴沉的午后。”

5. 维度转换(2D ↔ 3D)

一个强大的新功能是将 2D 示意图转换为 3D 可视化,反之亦然。这对于室内设计师、建筑师和模因(梗图)创作者来说非常理想。

提示词示例

2D 平面图转 3D 室内设计板:

“Based on the uploaded 2D floor plan, generate a professional interior design presentation board in a single image. Layout: A collage with one large main image at the top (wide-angle perspective of the living area), and three smaller images below (Master Bedroom, Home Office, and a 3D top-down floor plan). Style: Apply a Modern Minimalist style with warm oak wood flooring and off-white walls across ALL images. Quality: Photorealistic rendering, soft natural lighting.”
“基于上传的 2D 平面图,在单张图片中生成专业的室内设计演示板。布局:拼贴画形式,顶部是一张大的主图(起居区的广角透视),下面是三张小图(主卧、家庭办公室和 3D 俯视平面图)。风格:所有图片均采用现代极简风格,搭配温暖的橡木地板和米白色墙壁。质量:照片级逼真渲染,柔和的自然光。”

2D 转 3D 梗图转换:

“Turn the ‘This is Fine’ dog meme into a photorealistic 3D render. Keep the composition identical but make the dog look like a plush toy and the fire look like realistic flames.”
“将‘This is Fine(这就很好)’的狗梗图转换成照片级逼真的 3D 渲染图。保持构图完全一致,但让狗看起来像毛绒玩具,火看起来像逼真的火焰。”

6. 高分辨率与纹理

Nano-Banana Pro 支持原生 1K 到 4K 图像生成。这对于详细的纹理或大格式打印特别有用。

最佳实践

  • 如果你的 API/界面允许,明确要求高分辨率(2K 或 4K)。
  • 描述高保真细节(瑕疵、表面纹理)。

提示词示例

4K 纹理生成:

“Harness native high-fidelity output to craft a breathtaking, atmospheric environment of a mossy forest floor. Command complex lighting effects and delicate textures, ensuring every strand of moss and beam of light is rendered in pixel-perfect resolution suitable for a 4K wallpaper.”
“利用原生高保真输出,打造一个令人叹为观止、充满氛围感的长满苔藓的森林地面环境。驾驭复杂的光效和细腻的纹理,确保每一缕苔藓和每一束光线都以适合 4K 壁纸的像素级完美分辨率渲染。”

复杂逻辑(思考模式):

“Create a hyper-realistic infographic of a gourmet cheeseburger, deconstructed to show the texture of the toasted brioche bun, the seared crust of the patty, and the glistening melt of the cheese. Label each layer with its flavor profile.”
“制作一张超逼真的美味芝士汉堡信息图,将其解构以展示烤布里欧修面包的质感、肉饼煎烤的焦脆外壳以及奶酪融化时的光泽。标注每一层的风味特征。”

7. 思考与推理

Nano-Banana Pro 默认使用“思考”过程,在渲染最终输出之前生成中间思维图像(不收费)以优化构图。这允许进行数据分析和解决视觉问题。

提示词示例

解方程:

“Solve log_{x^2+1}(x^4-1)=2 in C on a white board. Show the steps clearly.”
“在白板上在复数域 C 内求解 log_{x^2+1}(x^4-1)=2。清晰地展示步骤。”

视觉推理:

“Analyze this image of a room and generate a ‘before’ image that shows what the room might have looked like during construction, showing the framing and unfinished drywall.”
“分析这张房间的图片,并生成一张‘之前’的图片,展示该房间在施工期间可能的样子,显示框架和未完成的干墙。”

8. 单次生成故事板与概念艺术

你可以在没有网格的情况下生成连续艺术或故事板,确保单次会话中叙事的连贯性。这在“电影概念艺术”(例如,即将上映电影的伪造泄密图)中也很流行。

提示词示例

“Create an addictively intriguing 9-part story with 9 images featuring a woman and man in an award-winning luxury luggage commercial. The story should have emotional highs and lows, ending on an elegant shot of the woman with the logo. The identity of the woman and man and their attire must stay consistent throughout but they can and should be seen from different angles and distances. Please generate images one at a time. Make sure every image is in a 16:9 landscape format.”
“创作一个引人入胜的 9 部分故事,包含 9 张图片,主角是一男一女,出现在一个获奖的豪华行李箱广告中。故事应有情感的高潮和低谷,最后以女人与 Logo 的优雅镜头结束。女人和男人的身份及其着装必须全程保持一致,但可以且应该从不同的角度和距离展示。请一次生成一张图片。确保每张图片都是 16:9 的横向格式。”

9. 结构控制与布局指导

输入图像不仅限于角色参考或需要编辑的主体。你可以利用它们严格控制最终输出的构图和布局。对于需要将餐巾纸草图、线框图或特定网格布局转化为完善资产的设计师来说,这是一个游戏规则改变者。

最佳实践

  • 草稿与素描:上传手绘草图,确切定义文本和物体应放置的位置。
  • 线框图:使用现有布局或线框图的屏幕截图来生成高保真 UI 模型。
  • 网格:使用网格图像强制模型为基于图块的游戏或 LED 显示屏生成资产。

提示词示例

草图转最终广告:

“Create a ad for a [product] following this sketch.”
“根据这个草图为 [产品] 制作一个广告。”

基于线框图的 UI 模型:

“Create a mock-up for a [product] following these guidelines.”
“根据这些指南为 [产品] 创建一个模型。”

像素艺术与 LED 显示屏:

“Generate a pixel art sprite of a unicorn that fits perfectly into this 64x64 grid image. Use high contrast colors.”
(Tip: Developers can then programmatically extract the center color of each cell to drive a connected 64x64 LED matrix display).
“生成一个独角兽的像素艺术精灵,使其完美适配这个 64x64 的网格图像。使用高对比度颜色。”
(提示:开发者随后可以通过编程提取每个单元格的中心颜色,以驱动连接的 64x64 LED 矩阵显示屏)。

精灵图:

“Sprite sheet of a woman doing a backflip on a drone, 3x3 grid, sequence, frame by frame animation, square aspect ratio. Follow the structure of the attached reference image exactly..”
(Tip: You can then extract each cell and make a gif)
“一个女人在无人机上做后空翻的精灵图表(Sprite sheet),3x3 网格,序列,逐帧动画,正方形比例。严格遵循所附参考图像的结构。”
(提示:你可以提取每个单元格并制作成 gif)

10. 下一步做什么?

现在你已经掌握了提示词的基础知识,以下是你如何开始构建:

  • 在 UI 中实验:Google AI Studio 是测试提示词和参数的最快方式。
  • 查看应用库中非常酷的 Nano-banana 驱动的应用
  • 凭感觉写代码(Vibe-code)构建你的梦想应用:将你最好的提示词转化为应用,并可以在 AI Studio Build 中轻松与朋友分享。
  • 构建应用程序:准备好写代码了吗?查看开发者指南或 Gemini API Cookbook 获取指南和代码片段。
  • 技术深潜:阅读完整的 Gemini API 文档,了解有关速率限制、定价和集成的详细信息。